home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / DB_CLIPP / 3420A.ZIP / TW150L.ZIP / WINDEMO.PRG < prev   
Text File  |  1992-04-12  |  98KB  |  2,756 lines

  1. //------------------------------------------------------------------------
  2. //
  3. //                           WINDEMO.PRG
  4. //
  5. //              Demonstration Program for TSDWIN.LIB
  6. //                    Clipper 5.01 Window Library
  7. //
  8. //      Copyright ( C ) 1991 Trilateral Systems Development Ltd.
  9. //    All Rights Reserved * Version 1.50 * Release Date: 01-25-92
  10. //
  11. //                         18 Bond St. South
  12. //                        Dundas, ON,  Canada
  13. //                              L9H 3H1
  14. //                           416-628-5086
  15. //
  16. //----- Documented: 06-15-91 at 09:52:51pm -------------------------------
  17. //------------------------------------------------------------------------
  18. // Preprocessor Directives
  19. //------------------------------------------------------------------------
  20. #include "achoice.ch"
  21. #include "inkey.ch"
  22. #include "tsdwin.ch"
  23. #include "windemo.ch"
  24.  
  25. //------------------------------------------------------------------------
  26. // File Wide Variable Declarations
  27. //------------------------------------------------------------------------
  28. STATIC nWin1, nWin2, nWin3, nWin4, nWin5, nWin6
  29. STATIC nX, nY, aTempArray := { "", "", "", "", "", "" }
  30. STATIC nMainChoice, nMenuLen, lMono
  31.  
  32. //------------------------------------------------------------------------
  33. //
  34. //  FUNCTION Main( SThickness, ClrOK )
  35. //
  36. //  Parameters:
  37. //
  38. //      Return:
  39. //
  40. //     Purpose:
  41. //
  42. //----- Documented: 06-15-91 at 09:52:51pm -------------------------------
  43. FUNCTION Main( SThickness, ClrOK )
  44.  
  45. //------------------------------------------------------------------------
  46. // Define LOCAL Variables for Main()
  47. //------------------------------------------------------------------------
  48. LOCAL aPrompts:={" «A» TSDWIN.LIB Features   ", ;
  49.                  " «B» Shadow Types          ", ;
  50.                  " «C» Border Types          ", ;
  51.                  " «D» Line Drawing          ", ;
  52.                  " «E» Box Drawing           ", ;
  53.                  " «F» Area Operations       ", ;
  54.                  " «G» Headers/Footers       ", ;
  55.                  " «H» Text Management       ", ;
  56.                  " «I» GETs and PROMPTs      ", ;
  57.                  " «J» Redisplaying          ", ;
  58.                  " «K» Reactivating          ", ;
  59.                  " «L» Moving/Sliding/Sizing ", ;
  60.                  " «M» Picklists             ", ;
  61.                  " «N» Instance Variables.   ", ;
  62.                  " «O» TSDWIN Function List  ", ;
  63.                  " «P» BIG Stuff             ", ;
  64.                  " «Q» Run the Whole Demo!!! "}
  65.  
  66. LOCAL f, MenuAction:='', StackLen, nMenuRow, aMenu := {}
  67. LOCAL DispArray:={}, cAction
  68. MEMVAR nNum, nRow
  69. AADD( DispArray, {"One of the most powerful features of «TSDWIN»", ;
  70.                   "is its ability to operate on any  window in", ;
  71.                   "the stack.  You  can «write to either active»", ;
  72.                   "«or inactive windows».", ;
  73.                   "All the other features let you  design YOUR", ;
  74.                   "interface the way YOU want it.  «TSDWIN» does", ;
  75.                   "not interfere with  «your personal style»  of", ;
  76.                   "interface design.", ;
  77.                   "«TSDWIN» is a granular library.  ONLY modules", ;
  78.                   "you need are linked.  We have respect for a", ;
  79.                   "need to  conserve  memory and have designed", ;
  80.                   "«TSDWIN» accordingly!", "", ;
  81.                   "Your continued  support is  appreciated and", ;
  82.                   "helps to make this the product YOU want."} )
  83.  
  84. AADD( DispArray, {"You can pick from  «four shadow positions» or", ;
  85.                   "have no shadow if you choose.", " ", ;
  86.                   "«Shadow thickness», 1 or 2 lines on the sides", ;
  87.                   "of the windows may be globally set.", ;
  88.                   "Monochrome shadows are rendered with ASCII7", ;
  89.                   "and Colour in ASCII8."} )
  90.  
  91. AADD( DispArray, {"There are «14 border types» to choose from. A", ;
  92.                   "window's frame colour can be passed  either", ;
  93.                   "as a «character string or a 2 element array».", ;
  94.                   "Therefore, you can have «one frame colour in»", ;
  95.                   "«active windows and another for inactive».", " ", ;
  96.                   "Wise use of colour can give you interesting", ;
  97.                   "effects.", " ", ;
  98.                   "Frame types can also be changed on the fly.", " ", ;
  99.                   "Of course, you may opt to open windows with", ;
  100.                   "no border, for example, twOpen()  opens full", ;
  101.                   "screen windows  with no  border in  current", ;
  102.                   "colours when no parameters are passed!"} )
  103.  
  104. AADD( DispArray, {"«Horizontal» and «vertical» line functions give", ;
  105.                   "you «11 choices for horizontal» lines  and «12»", ;
  106.                   "«for vertical».", " ", ;
  107.                   "You can choose colours other than those for", ;
  108.                   "the default window text colour."} )
  109.  
  110. AADD( DispArray, {"You can put «boxes» anywhere within a window.", " ", ;
  111.                   "There are «14 types» to  choose from.  Colour", ;
  112.                   "is your choice anytime. Other library calls", ;
  113.                   "normally made  to  windows  may be  used on", ;
  114.                   "boxes. For example, you can scroll in a box", ;
  115.                   "and either include or exclude the border."} )
  116.  
  117. AADD( DispArray, {"You can «fill», «clear», «colour» or «shadow» boxes", ;
  118.                   "you make as well as «change the border» type.", " ", ;
  119.                   "In all cases, you can include or  exclude a", ;
  120.                   "border area in the operation. «TSDWIN» offers", ;
  121.                   "you wide flexibility, but the defaults make", ;
  122.                   "common function calls easily."} )
  123.  
  124. AADD( DispArray, {"You can effortlessly make titles for  your, ", ;
  125.                   "windows. «TSDWIN» offers you two ways to make", ;
  126.                   "your «headers» and «footers»:", " ", ;
  127.                   "You can pass an array to twOpen() or define", ;
  128.                   "them later with «twTitle()».", " ", ;
  129.                   "The titles can be in any colour you choose, ", ;
  130.                   "or you can default them to the window  text", ;
  131.                   "colour.", " ", ;
  132.                   "You may also pass a «delimiter»  string  with", ;
  133.                   "to further customize your window titles!"} )
  134.  
  135. AADD( DispArray, {"You can «justify»,  «center»  or «position»  text", ;
  136.                   "anywhere you want in a window.", " ", ;
  137.                   "«Replication» and a «typing  mode» are at  your", ;
  138.                   "disposal.", "", ;
  139.                   "You can «scroll» any region of a window,  and", ;
  140.                   "either include or exclude the border!", "", ;
  141.                   "At all times  you fully  control all colour", ;
  142.                   "selections, but  can easily work  with  our", ;
  143.                   "sensible defaults."} )
  144.  
  145. AADD( DispArray, {"You can  easily create and position gets by", ;
  146.                   "passing code blocks to «twGet()» or «twSayGet()»!", ;
  147.                   "In this version, RANGE should be handled in", ;
  148.                   "a VALID clause, but PICTURE, WHEN and VALID", ;
  149.                   "are included.", " ", ;
  150.                   "You can create menus with «twPrompt()». But if", ;
  151.                   "you want to use your own  get/menu systems, ", ;
  152.                   "«TSDWIN» makes it easy for you to incorporate", ;
  153.                   "your methods into the window system."} )
  154.  
  155. AADD( DispArray, {"You can «redisplay  windows»  from the  stack", ;
  156.                   "without activating them.", "", ;
  157.                   "This is useful in lists you have previously", ;
  158.                   "displayed and don't want to modify."} )
  159.  
  160. AADD( DispArray, {"Any window on the stack can be  made «active»", ;
  161.                   "in order that  all other library  functions", ;
  162.                   "will operate on that window.", "", ;
  163.                   "Remember, you can have «inactive  and active»", ;
  164.                   "«frame colours» defined differently.", "", ;
  165.                   "As well as activating a window, which shows", ;
  166.                   "in the foreground of the  display,  you can", ;
  167.                   "also redirect all «TSDWIN» function output to", ;
  168.                   "an inactive window. If you want  to do that", ;
  169.                   "you may have to do some bounds checking!"} )
  170.  
  171. AADD( DispArray, {"You can  «MOVE»,  «SLIDE» and  «SIZE»  any active", ;
  172.                   "window!! In all such cases, the  shadow  is", ;
  173.                   "updated as the window moves.", "", ;
  174.                   "The «twSize()» and «twSlide()» functions are  big", ;
  175.                   "and should be linked only if needed.", "", ;
  176.                   "VMM swapping can create a problem when  you", ;
  177.                   "are using Clipper 5.0. If you have any, try", ;
  178.                   "setting CLIPPER=E0000. These  functions are", ;
  179.                   "optimized for speed with 'C' or ASM code."} )
  180.  
  181. AADD( DispArray, {"There are functions which will let you show", ;
  182.                   "«picklists» from  «databases or arrays». «TSDWIN»", " ", ;
  183.                   "adds «scrollbars» automatically and will also", ;
  184.                   "use a default color scheme unless you  want", ;
  185.                   "define one. The default is SETCOLOR().", "", ;
  186.                   "Functions like this are NOT linked in UNTIL", ;
  187.                   "you call them! «TSDWIN»  treats  memory  as a", ;
  188.                   "precious commodity."} )
  189.  
  190. AADD( DispArray, {"You have access to the  «instance  variables»", ;
  191.                   "for windows. You can use them to make  your", ;
  192.                   "own functions to operate within the  «TSDWIN»", ;
  193.                   "environment."} )
  194.  
  195. AADD( DispArray, {"«TSDWIN» Function List displayed with one  of", ;
  196.                   "the library MaxiFunctions, «twTextFile()»."} )
  197.  
  198. AADD( DispArray, {"«TSDWIN» has functions to «display messages» as", ;
  199.                   "well as «alert boxes»  which  conform to  the", ;
  200.                   "operation and system conventions of similar", ;
  201.                   "functions in MS-Windows.", "", ;
  202.                   "«Push Button», «Radio» and «Select» box functions", ;
  203.                   "are now included.", "", ;
  204.                   "Configurable «DBF and Array  browsers», «Index»", ;
  205.                   "windows, a «Calculator», «Calendar» and message", ;
  206.                   "systems are available.", "", ;
  207.                   "Modest «communications»  functions & «hardware»", ;
  208.                   "add to the versatility of «TSDWIN»."})
  209.  
  210. AADD( DispArray, {"Some user input is required", "", ;
  211.                   "during this demo."} )
  212.  
  213. nNum := 1; nRow := 0
  214.  
  215. //------------------------------------------------------------------------
  216. // Initialize Global Statics
  217. //------------------------------------------------------------------------
  218. nMainChoice := 1; nMenuLen := LEN( aPrompts )
  219.  
  220. //------------------------------------------------------------------------
  221. // Set Up Environment
  222. //------------------------------------------------------------------------
  223. SET CURSOR OFF
  224. SET SCOREBOARD OFF
  225. SET WRAP ON
  226.  
  227. //------------------------------------------------------------------------
  228. // Link in the Screen Savers
  229. //------------------------------------------------------------------------
  230. EXTERNAL twSSaveAsc
  231. EXTERNAL twWSaveAsc
  232. SET KEY 287 TO twSSaveAsc
  233. SET KEY 273 TO twWSaveAsc
  234. //SET KEY 287 TO twSSaveMem
  235. //SET KEY 273 TO twWSaveMem
  236.  
  237. IF SThickness == NIL
  238.     SThickness := '2'
  239. ENDIF
  240.  
  241. IF ClrOK == NIL
  242.     lMono := .F.
  243. ELSEIF UPPER( ClrOK ) == 'C'
  244.     lMono := .F.
  245. ELSE
  246.     lMono := .T.
  247. ENDIF
  248.  
  249. //------------------------------------------------------------------------
  250. // Initialze window stack to thick or thin
  251. // and allow for Monchrome Override if Graphics card installed
  252. // Save environment and DOS screen
  253. //------------------------------------------------------------------------
  254. twInit( VAL( SThickness ))
  255. twOpen()
  256. twSaveScrEnv()
  257.  
  258. //------------------------------------------------------------------------
  259. // Initialze Message and Alert colours
  260. // Set Up Bright Backgrounds
  261. //------------------------------------------------------------------------
  262. If ! lMono
  263.     twMsgInit( , { INFOCLR, INQUCLR, WARNCLR, TEXTCLR, PMENCLR } )
  264.     twAlertInit( , { BUTCLR, RADCLR, CHKCLR } )
  265.     twAMsgInit( , { AINFOCLR, AWARNCLR } )
  266.     SETBLINK( .F. )
  267. ENDIF
  268.  
  269. //------------------------------------------------------------------------
  270. // Initialize the Mouse
  271. //------------------------------------------------------------------------
  272. twMouseInit()
  273.  
  274. //------------------------------------------------------------------------
  275. // Open Main Display Window
  276. //------------------------------------------------------------------------
  277. twExplode( .T. )
  278. twOpen( FULLSCREEN, MAINBLU, 5, 10 )
  279. twExplode( .F. )
  280. twTitle( "TSD Window Library Demonstration", BLU_WHI, "T", "C" )
  281. twOpen( 2, 3, 23, 75, MAINBLU )
  282. twTitle( "TSDWIN Demo Menu", CYH_BLU, "T", "C" )
  283. twTitle( "Pick One and Be Amazed!", CYH_BLU, "B", "C" )
  284. twCenter( 20, "Cursor Keys to Select : ENTER to View : ESC when Done", GNH_BLU )
  285.  
  286. KEYBOARD CHR( 32 )
  287. DO WHILE .T.
  288.  
  289.     nMenuRow := twRow( 0 )
  290.     twMenuInit(  2, twRow( 3 ), twCol( 30 ), IIF( ! lMono, "bg+/b,gr+/b", "w/n,w+/n" ), )
  291.     FOR nX = 1 TO nMenuLen - 1
  292.         cAction := "wProc" + PADL( STRINT( nX ), 2, '0' ) + "()"
  293.         @ ++nMenuRow, twCol( 0 ) WPROMPT aPrompts[ nX ] ;
  294.                                  MESSAGE DispArray[ nX ] ;
  295.                                  ACTION &cAction
  296.     NEXT
  297.  
  298.     WMENU TO nMainChoice
  299.  
  300.     IF nMainChoice = 0
  301.         EXIT
  302.     ENDIF
  303.  
  304. ENDDO
  305.  
  306. twPop()
  307.  
  308. //------------------------------------------------------------------------
  309. // End The Demonstration
  310. //------------------------------------------------------------------------
  311. twScroll( 22, .F. )
  312. SignOff()
  313.  
  314. Phones()
  315.  
  316. StackLen := LEN( _twStack())
  317. FOR nX = 1 to StackLen
  318.     twPop()
  319. NEXT
  320.  
  321. twRestScrEnv()
  322.  
  323. RETURN .T.
  324.  
  325. //------------------------------------------------------------------------
  326. // End of Windemo.prg
  327. //------------------------------------------------------------------------
  328.  
  329. //------------------------------------------------------------------------
  330. //
  331. //  PROCEDURE wProc01()
  332. //
  333. //     Purpose: TSDWIN.LIB   Features
  334. //
  335. //----- Documented: 06-15-91 at 09:54:24pm --------------------------
  336. PROCEDURE wProc01()
  337. twOpen( FULLSCREEN, MAINBLU, 5, 9 )
  338. IF ! lMono
  339.     SETBLINK( .F. )
  340. ENDIF
  341. twTitle( "TSDWIN.LIB Features", YEL_BLU, "T", "C" )
  342. twCenter( 2, "Some of TSDWIN.LIB's Many Features...", CYH_BLU )
  343. twInkeyWait( 2 )
  344. twSay( 04, 16, " Select from Four Shadow Positions or None.", YEL_BLU )
  345. twInkeyWait( 2 )
  346. twSay( 05, 16, " Choose A Border Type for Your Window.", YEL_BLU )
  347. twInkeyWait( 2 )
  348. twSay( 06, 16, " You Can Draw Horizontal and Vertical Lines, ", YEL_BLU )
  349. twInkeyWait( 2 )
  350. twSay( 07, 16, " And 14 Types of Boxes.", YEL_BLU )
  351. twInkeyWait( 2 )
  352. twSay( 08, 16, " And You Can Shadow, Clear and Colour Your Boxes.", YEL_BLU )
  353. twInkeyWait( 2 )
  354. twSay( 09, 16, " You Can Position Titles Effortlessly.", YEL_BLU )
  355. twInkeyWait( 2 )
  356. twSay( 10, 16, " Elegant Text Management is Easy.", YEL_BLU )
  357. twInkeyWait( 2 )
  358. twSay( 11, 16, " You Can Display GETs and PROMPTs.", YEL_BLU )
  359. twInkeyWait( 2 )
  360. twSay( 12, 16, " Screens Can Be Redisplayed From the Stack.", YEL_BLU )
  361. twInkeyWait( 2 )
  362. twSay( 13, 16, " You Can Reactivate Previous Windows!", YEL_BLU )
  363. twInkeyWait( 2 )
  364. twSay( 14, 16, " You Can MOVE or SLIDE a Window!", YEL_BLU )
  365. twInkeyWait( 2 )
  366. twSay( 15, 16, " You Can Create picklists with ease!", YEL_BLU )
  367. twInkeyWait( 2 )
  368. twSay( 16, 16, " You Can Retrieve A Window's Instance Variables.", YEL_BLU )
  369. twInkeyWait( 2 )
  370. twSay( 17, 16, " Save Screens or Windows to MEM or ASCII Files.", GNH_BLU )
  371. twInkeyWait( 2 )
  372. twSay( 18, 16, " Choose Shadow Thickness.", GNH_BLU )
  373. twInkeyWait( 2 )
  374. twSay( 19, 16, " SMALL Kernel ( 24K ) Small is Beautiful!!", WHH_BLU )
  375. twInkeyWait( 2 )
  376. twSay( 20, 16, " Optimized for Speed.", WHH_BLU )
  377. twInkeyWait( 2 )
  378. twSay( 21, 16, " More Features Yet to Come", YEL_BLU )
  379. twInkeyWait( 1 )
  380. twScroll( 1, .F. )
  381. twSay( 21, 16, " More MAXI Functions:", WHH_BLU )
  382. twInkeyWait( 1 )
  383. twScroll( 1, .F. )
  384. twSay( 21, 16, " ACHOICES... TBROWSES...", WHH_BLU )
  385. twInkeyWait( 1 )
  386. twScroll( 1, .F. )
  387. twSay( 21, 16, " Dialog Boxes, Alert Boxes...", WHH_BLU )
  388. twInkeyWait( 1 )
  389. twScroll( 1, .F. )
  390. twSay( 21, 16, " Radio Boxes, Buttons...", WHH_BLU )
  391. twScroll( 1, .F. )
  392. twInkeyWait( 1 )
  393. twSay( 21, 16, " And you STILL WON'T HAVE TO link them!", YEL_BLU )
  394. twScroll( 3, .F. )
  395. twInkeyWait( 1 )
  396. twSay( 20, 16, " YOU help us decide what goes into TSDWIN.", GNH_BLU )
  397. twSay( 21, 16, " SO YOU benefit from EVERYONE'S ideas!.", GNH_BLU )
  398. twInkeyWait( 1 )
  399.  
  400. twTitle( "Press a Key or Wait...",, "B", "C" )
  401. twInkeyWait( 3 )
  402. twOpen( 3, 10, 13, 71, IIF( ! lMono, "n/*bg", "n/w" ), 1, 13 )
  403. twCenter( 2, "TSDWIN.LIB" )
  404. twCenter( 4, "Looks After the Details" )
  405. twCenter( 6, "While YOU Use YOUR Expertise" )
  406. twCenter( 8, "Where It COUNTS!" )
  407. twTitle( "Press a Key or Wait...",, "B", "C" )
  408. twInkeyWait( 3 )
  409. twPop();twPop()
  410. RETURN
  411.  
  412. //-------------------------------------------------------------------
  413. //
  414. //  PROCEDURE wProc02()
  415. //
  416. //     Purpose: Show Shadow Types
  417. //
  418. //----- Documented: 06-15-91 at 09:54:41pm --------------------------
  419. PROCEDURE wProc02()
  420. LOCAL nWin1, nHandle
  421. nWin1 := twOpen( FULLSCREEN, WHH_BLU, 5, 9, "" )
  422. twTitle( "Window Shadows", BLU_WHH, "T", "C" )
  423. twTitle( "Press a Key or Wait", BLU_WHH, "B", "C" )
  424. twOpen( 3, 5, 9, 34, RDH_CYH, 1, 2 )
  425. twCenter( 3, "Shadow Type 1" )
  426. twOpen( 3, 45, 9, 74, RDH_CYH, 7, 2 )
  427. twCenter( 3, "Shadow Type 7" )
  428. twOpen( 13, 5, 19, 34, RDH_CYH, 9, 2 )
  429. twCenter( 3, "Shadow Type 9" )
  430. twOpen( 13, 45, 19, 74, RDH_CYH, 3, 2 )
  431. twCenter( 3, "Shadow Type 3" )
  432. twInkeyWait( 3 )
  433. nHandle := _twHandle( nWin1 )
  434. BEEPER
  435. twCenter( 22, " Remember, You can Change the Thickness with twInit() ", ;
  436.               YEL_BLU )
  437. twInkeyWait( 3 )
  438. FOR nX = 1 TO 5
  439.     twPop()
  440. NEXT
  441. RETURN
  442.  
  443. //-------------------------------------------------------------------
  444. //
  445. //  PROCEDURE wProc03()
  446. //
  447. //     Purpose: Show Border Types
  448. //
  449. //----- Documented: 06-15-91 at 09:55:06pm --------------------------
  450. PROCEDURE wProc03()
  451. LOCAL nRow, nCol, nHandle, aTitle, nMainWin
  452. LOCAL win01, win02, win03, win04, win05, win06, win07, win08, win09
  453. LOCAL nWin10, nWin11, nWin12, nWin13, nWin14, winnum:={}
  454. LOCAL aTempArray := { CYH_GRN, GNH_VIO, WHH_VIH, YEL_RDH, BLA_GNH, WHH_BLH, ;
  455.                   RDH_YLH, RED_YLH, GRN_WHH, BLH_CYN, BLA_YLH, RDH_GNH, ;
  456.                   YEL_WHH, CYH_RDH, MAINRED }
  457.  
  458. nMainWin := twOpen( FULLSCREEN, IIF( ! lMono, ;
  459.                   "b+/b", "w+/n" ), 5, 12, "▒" )
  460. twTitle( "Window Borders", BLU_WHH, "T", "C" )
  461. twTitle( "Press a Key or Wait", BLU_WHH, "B", "C" )
  462.  
  463. nCol:=-4
  464. FOR nX = 1 TO 14
  465.     nRow := IIF( nX > 7, 9, 2 )
  466.     nCol := nCol + 10
  467.     AADD( winnum, "win" + PADL( STRINT( nX ), 2, "0" ))
  468.     winnum[ nX ] := twOpen( nRow, nCol, nRow + 5, nCol + 7, RDH_CYH, 5, nX )
  469.     twCenter( 2, "Type" );twCenter( 3, STRINT( nX ))
  470.     nCol := IIF( nX == 7, -4, nCol )
  471. NEXT
  472. twInkeyWait( 3 )
  473. BEEPER
  474. nHandle := _twHandle( nMainWin )
  475. aTitle := _twTitle()
  476. twCenter( 16, " You can change the frame Type of any window! ", YEL_BLU )
  477. twInkeyWait( 1 )
  478. FOR  nX = 1 TO 14
  479.     twFrame( nX, YEL_BLU );twPutTitles( aTitle );twInkeyWait( .5 )
  480. NEXT
  481.  
  482. BEEPER
  483. _twHandle( nMainWin )
  484. twCenter( 18, " Or the Colour! ", YEL_BLU )
  485. twInkeyWait( 1 )
  486.  
  487. FOR nX = 1 to 14
  488.     _twHandle( winnum[ nX ] )
  489.     twFrame( _twFrame(), aTempArray[ nX ] )
  490.     twInkeyWait( .1 )
  491. NEXT
  492.  
  493. twInkeyWait( 1 )
  494. BEEPER
  495. _twHandle( nMainWin )
  496. twCenter( 20, " The Frame Colour can be a Two Element Array ", CYH_BLU )
  497. twCenter( 21, " To Allow Active/Inactive Windows to have ", CYH_BLU )
  498. twSay( 22, 21, " Separate Colours.", CYH_BLU )
  499. twInkeyWait( 1 )
  500. twType( 22, 39, "  ( Like MS-Windows ) ", WHH_BLU, .F. )
  501. twInkeyWait( 1 )
  502.  
  503. _twHandle( nHandle )
  504. twInkeyWait( 6 )
  505. FOR nX = 1 TO 15
  506.     twPop()
  507. NEXT
  508. RETURN
  509.  
  510. //-------------------------------------------------------------------
  511. //
  512. //  PROCEDURE wProc04()
  513. //
  514. //     Purpose: Show Line Types
  515. //
  516. //----- Documented: 06-15-91 at 09:55:21pm --------------------------
  517. PROCEDURE wProc04()
  518. LOCAL nType
  519.  
  520. twOpen( 7, 8, 21, 73, YEL_CYN, 1, 9 )
  521. twTitle( "Line Types",, "T", "C" )
  522. twTitle( "Key or Wait",, "B", "C" )
  523. twTitle( "Horizontal", RED_CYN, "B", "L" )
  524. FOR nX = 1 TO 11
  525.     nType := PADL( STRINT( nX ), 2 )
  526.     twLeft( nX + 1, "   Type  " + nType + ":" )
  527.     twHLine( nX + 1, 15, 09, nX, RED_CYN )
  528. NEXT
  529. twTitle( "Vertical", BLU_CYN, "B", "R" )
  530. @ twRow( 2 ), twCol( 44 ) say "Types"
  531. @ twRow( 3 ), twCol( 26 ) say "  1  2  3  4  5  6  7  8  9 10 11 12"
  532. FOR nX = 1 TO 12
  533.     twVLine( 5, 28 + 3 * ( nX - 1 ), 8, nX, BLU_CYN )
  534. NEXT
  535. twInkeyWait( 6 )
  536. twPop()
  537. RETURN
  538.  
  539. //-------------------------------------------------------------------
  540. //
  541. //  PROCEDURE wProc05()
  542. //
  543. //     Purpose: Show Box Types
  544. //
  545. //----- Documented: 06-15-91 at 09:55:33pm --------------------------
  546. PROCEDURE wProc05()
  547. LOCAL cFilChrs := "* ░▒▓█"
  548. LOCAL nRow, nCol
  549. LOCAL cClrStrs := { YEL_CYN, YEL_RED, GRN_WHH, WHH_VIH, RED_YLH, BLA_YLH, ;
  550.                    MAINRED, BLU_CYN, RDH_CYH, WHH_VIH, YEL_CYH, YEL_BLU, ;
  551.                    YEL_GRN, WHH_BLA }
  552. //*************************
  553. // Demonstrate Boxes
  554. //*************************
  555. twOpen( FULLSCREEN, RDH_BLU, 1, 9 )
  556. FOR nY = 1 TO 3
  557.     IF nY == 1
  558.         twTitle( "Box Types",, "T", "C" )
  559.     ELSEIF nY == 2
  560.         twTitle( "Box Types in Colours",, "T", "C" )
  561.     ELSEIF nY == 3
  562.         twTitle( "Filled Box Types in Colour",, "T", "C" )
  563.     ENDIF
  564.     nCol := -5
  565.     FOR nX = 1 TO 14
  566.         nRow := IIF( nX > 7, 13, 4 )
  567.         nCol := nCol + 10
  568.         IF nY == 1
  569.             twBox( nRow, nCol, nRow + 5, nCol + 7, nX, YEL_BLU )
  570.         ELSEIF nY == 2
  571.             twBox( nRow, nCol, nRow + 5, nCol + 7, nX, cClrStrs[ nX ] )
  572.         ELSEIF nY == 3
  573.             twBox( nRow, nCol, nRow + 5, nCol + 7, nX, cClrStrs[ nX ], ;
  574.             SUBSTR( cFilChrs, nX, 1 ))
  575.         ENDIF
  576.         nCol := IIF( nX == 7, -5, nCol )
  577.     NEXT
  578.     twInkeyWait( 2 )
  579.     IF nY == 1
  580.         BEEPER
  581.         twTitle( "Draw Them In Different Colours",, "B", "C" )
  582.         twInkeyWait( 2 )
  583.     ELSEIF nY == 2
  584.         BEEPER
  585.         twTitle( "And Fill Them While You Make Them!",, "B", "C" )
  586.         twInkeyWait( 2 )
  587.     ENDIF
  588. NEXT
  589. twPop()
  590. RETURN
  591.  
  592. //-------------------------------------------------------------------
  593. //
  594. //  PROCEDURE wProc06()
  595. //
  596. //     Purpose: Shadow, Clear, Fill and Colour Boxes
  597. //
  598. //------------------------------------------------------------------------
  599. PROCEDURE wProc06()
  600. LOCAL nCol := 14, nRow := 4
  601. //***************************
  602. // Shadow the Boxes
  603. //***************************
  604. twOpen( FULLSCREEN, WHH_BLU, 5, 9, "" )
  605. twTitle( "Boxes with Shadows",, "T", "C" )
  606. twTitle( "Press a Key or Wait",, "B", "C" )
  607. twBox( nRow, nCol, nRow + 6, nCol + 20, 1,     BLA_CYH, " " )
  608. twShadow( nRow, nCol, nRow + 6, nCol + 20, 7 )
  609.  
  610. twSay( nRow + 01, nCol + 3, "████████",  RDH_CYH )
  611. twSay( nRow + 02, nCol + 3, "   ██   ",  RDH_CYH )
  612. twSay( nRow + 03, nCol + 3, "   ██   ",  RDH_CYH )
  613. twSay( nRow + 04, nCol + 3, "   ██   ",  RDH_CYH )
  614. twSay( nRow + 05, nCol + 3, "   ██   ",  RDH_CYH )
  615. twSay( nRow + 05, nCol + 9, "RILATERAL", BLU_CYH )
  616.  
  617. twBox( nRow, nCol + 32, nRow + 6, nCol + 52, 1,    BLA_CYH, " " )
  618. twShadow( nRow, nCol + 32, nRow + 6, nCol + 52, 9 )
  619.  
  620. twSay( nRow + 01, nCol + 35, "████████",  YEL_CYH )
  621. twSay( nRow + 02, nCol + 35, "██      ",  YEL_CYH )
  622. twSay( nRow + 03, nCol + 35, "████████",  YEL_CYH )
  623. twSay( nRow + 04, nCol + 35, "      ██",  YEL_CYH )
  624. twSay( nRow + 05, nCol + 35, "████████",  YEL_CYH )
  625. twSay( nRow + 05, nCol + 44, "YSTEMS",    BLU_CYH )
  626.  
  627. twBox( nRow + 9, nCol, nRow + 15, nCol + 24, 1,   BLA_CYH, " " )
  628. twShadow( nRow + 9, nCol, nRow + 15, nCol + 24, 1 )
  629.  
  630. twSay( nRow + 10, nCol + 3, "████████", WHI_CYH )
  631. twSay( nRow + 11, nCol + 3, "██     ▐", WHI_CYH )
  632. twSay( nRow + 12, nCol + 3, "██     ▐", WHI_CYH )
  633. twSay( nRow + 13, nCol + 3, "██     ▐", WHI_CYH )
  634. twSay( nRow + 14, nCol + 3, "████████", WHI_CYH )
  635. twSay( nRow + 14, nCol + 12, "EVELOPMENT", BLU_CYH )
  636.  
  637. twBox( nRow + 9, nCol + 32, nRow + 15, nCol + 52, 1,  BLA_CYH, " " )
  638. twShadow( nRow + 9, nCol + 32, nRow + 15, nCol + 52, 3 )
  639. twSay( nRow + 12, nCol + 39, "Limited",  BLU_CYH )
  640. twInkeyWait( 2 )
  641. BEEPER
  642.  
  643. //***************************
  644. // Demonstrate Box Clearing
  645. //***************************
  646. twTitle( "You Can Clear a Box", YEL_BLU, "B", "C" )
  647. twInkeyWait( 2 )
  648. twClear( .F., " ", nRow, nCol, nRow + 6, nCol + 20 )
  649. twInkeyWait( 2 )
  650. BEEPER
  651.  
  652. twTitle( "Or Include the Border", YEL_BLU, "B", "C" )
  653. twInkeyWait( 2 )
  654. twClear( .T., " ", nRow, nCol + 32, nRow + 6, nCol + 52 )
  655. twInkeyWait( 2 )
  656. BEEPER
  657.  
  658. twTitle( "And You Can Fill It While Clearing", YEL_BLU, "B", "C" )
  659. twInkeyWait( 2 )
  660. twClear( .T., "▒", nRow + 9, nCol, nRow + 15, nCol + 24 )
  661. twInkeyWait( 2 )
  662. twClear( .F., "▒", nRow + 9, nCol + 32, nRow + 15, nCol + 52 )
  663. twInkeyWait( 2 )
  664. BEEPER
  665.  
  666. //****************************************
  667. // Demonstrate Colour Attribute Changing
  668. //****************************************
  669. twTitle( "You Can Also Change the Colour Attribute of any Region.", YEL_BLU, "B", "C" )
  670. twInkeyWait( 2 )
  671. twSay( nRow + 11, nCol + 3, "See What" )
  672. twAttrib( .T., YEL_RED, nRow + 9, nCol, nRow + 15, nCol + 24 )
  673. twInkeyWait( 2 )
  674. twSay( nRow + 11, nCol + 35, "I Mean" )
  675. twAttrib( .F., IIF( ! lMono, "w+/br*", "w+/n" ), nRow + 9, nCol + 32, nRow + 15, nCol + 52 )
  676. twInkeyWait( 1 )
  677. twAttrib( .F., IIF( ! lMono, "b+/w", "n/w" ))
  678. twInkeyWait( 1 )
  679. twAttrib( .T., IIF( ! lMono, "gr+/rb", "w+/n" ))
  680. twInkeyWait( 2 )
  681. twPop()
  682. RETURN
  683.  
  684. //-------------------------------------------------------------------
  685. //
  686. //  PROCEDURE wProc07()
  687. //
  688. //     Purpose: Display Headers and Footer for Windows
  689. //              Justification, Colour and Delimiters
  690. //
  691. //----- Documented: 06-15-91 at 09:56:33pm --------------------------
  692. PROCEDURE wProc07()
  693. LOCAL temp
  694. LOCAL cClrStrs := { YEL_CYN, YEL_RED, GRN_WHH, WHH_VIH, RED_YLH, BLA_YLH, ;
  695.                    MAINRED, BLU_CYN, RDH_CYH, WHH_VIH, YEL_CYH, YEL_BLU, ;
  696.                    YEL_GRN, WHH_BLA }
  697.  
  698. twOpen( 7, 10, 17, 70, RDH_CYH, 1, 2 )
  699. twLeft( 3, "  You can center headers." )
  700. twInkeyWait( 1 )
  701. twTitle( "Trilateral Systems",, "T", "C" )
  702. twInkeyWait( 1 )
  703. @ twRow( 3 ), twCol( 27 ) SAY "Or right and left justify them!"
  704. twInkeyWait( 1 )
  705. twTitle( "LEFT",, "T", "L" )
  706. twInkeyWait( 1 )
  707. twTitle( "RIGHT",, "T", "R" )
  708. twInkeyWait( 1 )
  709. twCenter( 5, " You can do the same with footers." )
  710. twInkeyWait( 1 )
  711. twTitle( "Window Library",, "B", "C" )
  712. twInkeyWait( 1 )
  713. twTitle( "LEFT",, "B", "L" )
  714. twInkeyWait( 1 )
  715. twTitle( "RIGHT",, "B", "R" )
  716. twInkeyWait( 1 )
  717. twCenter( 7, " You can even choose their colour!" )
  718. twInkeyWait( 1 )
  719. ACOPY( cClrStrs, aTempArray, 1, 6 )
  720. twTitle( "Trilateral Systems", aTempArray[1], "T", "C" )
  721. twInkeyWait( 1 )
  722. twTitle( "LEFT", aTempArray[2], "T", "L" )
  723. twInkeyWait( 1 )
  724. twTitle( "RIGHT", aTempArray[3], "T", "R" )
  725. twInkeyWait( 1 )
  726. twTitle( "Window Library", aTempArray[4], "B", "C" )
  727. twInkeyWait( 1 )
  728. twTitle( "LEFT", aTempArray[5], "B", "L" )
  729. twInkeyWait( 1 )
  730. twTitle( "RIGHT", aTempArray[6], "B", "R" )
  731. twInkeyWait( 1 )
  732. FOR nX = 1 TO 5
  733.     twTitle( "LEFT", aTempArray[1], "T", "L" )
  734.     twInkeyWait( .01 )
  735.     twTitle( "Trilateral Systems", aTempArray[2], "T", "C" )
  736.     twInkeyWait( .01 )
  737.     twTitle( "RIGHT", aTempArray[3], "T", "R" )
  738.     twInkeyWait( .01 )
  739.     twTitle( "RIGHT", aTempArray[4], "B", "R" )
  740.     twInkeyWait( .01 )
  741.     twTitle( "Window Library", aTempArray[5], "B", "C" )
  742.     twInkeyWait( .01 )
  743.     twTitle( "LEFT", aTempArray[6], "B", "L" )
  744.     //********************
  745.     // rotate the array
  746.     //********************
  747.     temp := aTempArray[1]
  748.     ADEL( aTempArray, 1 )
  749.     aTempArray[6] := temp
  750. NEXT
  751. twInkeyWait( 2 )
  752. twCenter( 6, "Delimiters can be inserted.", RDH_CYH )
  753. twInkeyWait( 2 )
  754. ACOPY( cClrStrs, aTempArray, 7, 6 )
  755. FOR nX = 1 TO 5
  756.     twTitle( "LEFT", aTempArray[1], "T", "L", "[]" )
  757.     twInkeyWait( .01 )
  758.     twTitle( "Trilateral Systems", aTempArray[2], "T", "C", "" )
  759.     twInkeyWait( .01 )
  760.     twTitle( "RIGHT", aTempArray[3], "T", "R", "**" )
  761.     twInkeyWait( .01 )
  762.     twTitle( "RIGHT", aTempArray[4], "B", "R", "╣╠" )
  763.     twInkeyWait( .01 )
  764.     twTitle( "Window Library", aTempArray[5], "B", "C", "││" )
  765.     twInkeyWait( .01 )
  766.     twTitle( "LEFT", aTempArray[6], "B", "L", "╡╞" )
  767.     //*******************************
  768.     // swap first and last elements
  769.     //*******************************
  770.     temp := aTempArray[1]
  771.     ADEL( aTempArray, 1 )
  772.     aTempArray[6] := temp
  773. NEXT
  774. twInkeyWait( 4 )
  775. twPop()
  776. RETURN
  777.  
  778. //-------------------------------------------------------------------
  779. //
  780. //  PROCEDURE wProc08()
  781. //
  782. //     Purpose: Demonstrate Text Positioning in a Window
  783. //              Justification
  784. //              Replication
  785. //              Positioning
  786. //              Colours
  787. //              Typing
  788. //              Scrolling
  789. //
  790. //----- Documented: 06-15-91 at 09:56:46pm --------------------------
  791. PROCEDURE wProc08()
  792. LOCAL cClrStrs := { YEL_CYN, YEL_RED, GRN_WHH, WHH_VIH, RED_YLH, BLA_YLH, ;
  793.                    MAINRED, BLU_CYN, RDH_CYH, WHH_VIH, YEL_CYH, YEL_BLU, ;
  794.                    YEL_GRN, WHH_BLA }
  795. LOCAL cClrTemp
  796. ACOPY( cClrStrs, aTempArray, 1, 6 )
  797. twOpen( 1, 10, 22, 70, WHH_GRN, 3, 9 )
  798. twTitle( "Text Management",, "T", "C" )
  799. twInkeyWait( 1 )
  800. twLeft( 2, "It's easy to left justify text." )
  801. twInkeyWait( 1 )
  802. twCenter( 4, "And center it too!" )
  803. twInkeyWait( 1 )
  804. twRight( 6, "You can right justify, of Course." )
  805. twInkeyWait( 1 )
  806. twLeft( 8, " You can replicate any character." )
  807. twInkeyWait( 1 )
  808. twReplicate( 8, 35, "■", 24 )
  809. twInkeyWait( 1 )
  810. twCenter( 10, "You can also:" )
  811. twInkeyWait( 1 )
  812. twSay( 12, 10 + 4, "PUT" )
  813. twInkeyWait( .1 )
  814. twSay( 13, 12 + 4, "TEXT" )
  815. twInkeyWait( .1 )
  816. twSay( 14, 14 + 4, "ANYWHERE" )
  817. twInkeyWait( .1 )
  818. twSay( 15, 12 + 4, "YOU" )
  819. twInkeyWait( .1 )
  820. twSay( 16, 10 + 4, "WANT" )
  821. twInkeyWait( 1 )
  822. cClrTemp := aTempArray[6]
  823. twSay( 12, 46 - 5, " In ", aTempArray[1] )
  824. twInkeyWait( .1 )
  825. twSay( 13, 44 - 5, " Any ", aTempArray[2] )
  826. twInkeyWait( .1 )
  827. twSay( 14, 42 - 5, " Colour ", aTempArray[3] )
  828. twInkeyWait( .1 )
  829. twSay( 15, 44 - 5, " You ", aTempArray[4] )
  830. twInkeyWait( .1 )
  831. twSay( 16, 46 - 5, " Want ", aTempArray[5] )
  832. twInkeyWait( 1 )
  833.  
  834. //***********************************
  835. // Demonstrate Typing and Scrolling
  836. //***********************************
  837. twType( 18, 10, "You can emulate a typewriter if you want.", YEL_GRN, .T. )
  838. twType( 19, 11, " And you can turn off the sound, too! ", YEL_BLU, .F. )
  839. twScroll( 2, .F. )
  840. twType( 19, 17, "Scrolling your screen  can",, .F. )
  841. twScroll( 1, .F. )
  842. twType( 19, 17, "make your application look",, .F. )
  843. twScroll( 1, .F. )
  844. twType( 19, 17, "neat. With the TSD  Window",, .F. )
  845. twScroll( 1, .F. )
  846. twType( 19, 17, "Library you can scroll all",, .F. )
  847. twScroll( 1, .F. )
  848. twType( 19, 17, "or part of a window,  with",, .F. )
  849. twScroll( 1, .F. )
  850. twType( 19, 17, "or without the border.    ",, .F. )
  851. FOR nX = 1 TO 12
  852.     twScroll( 1, .F. )
  853.     twInkeyWait( .2 )
  854. NEXT
  855. twBox( 9, 4, 19, 27, 1, BLA_CYH )
  856. twShadow( 9, 4, 19, 27, 1 )
  857. twBox( 9, 33, 19, 56, 1, BLA_CYH )
  858. twShadow( 9, 33, 19, 56, 3 )
  859. nX := 1
  860. DO WHILE nX <= 6
  861.     twSay( 10, 05, " Use Your Imagination ", YEL_RDH )
  862.     twSay( 18, 34, " Use Your Imagination ", YEL_RDH )
  863.     twInkeyWait( .1 )
  864.     twScroll( -1, .F., 10, 5, 18, 26 )
  865.     twScroll( 1, .F., 10, 34, 18, 55 )
  866.     twInkeyWait( .1 )
  867.     twSay( 10, 05, " **  Have a  Ball  ** ", BLA_GNH )
  868.     twSay( 18, 34, " **  Have a  Ball  ** ", BLA_GNH )
  869.     twInkeyWait( .1 )
  870.     twScroll( -1, .F., 10, 5, 18, 26 )
  871.     twScroll( 1, .F., 10, 34, 18, 55 )
  872.     twInkeyWait( .1 )
  873.     twSay( 10, 05, " CLIPPERING is a joy, ", WHH_BLH )
  874.     twSay( 18, 34, " CLIPPERING is a joy, ", WHH_BLH )
  875.     twInkeyWait( .1 )
  876.     twScroll( -1, .F., 10, 5, 18, 26 )
  877.     twScroll( 1, .F., 10, 34, 18, 55 )
  878.     twInkeyWait( .1 )
  879.     twSay( 10, 05, " with  TSD's  Windows ", RDH_YLH )
  880.     twSay( 18, 34, " with  TSD's  Windows ", RDH_YLH )
  881.     twInkeyWait( .1 )
  882.     twScroll( -1, .F., 10, 5, 18, 26 )
  883.     twScroll( 1, .F., 10, 34, 18, 55 )
  884.     twInkeyWait( .1 )
  885.     nX++
  886. ENDDO
  887. twSay( 10, 05, " **Happy Clippering** ", WHH_VIH )
  888. twSay( 18, 34, " **Happy Clippering** ", WHH_VIH )
  889. twInkeyWait( 2 )
  890. twScroll( 22, .T. )
  891. twInkeyWait( .5 )
  892. twPop()
  893. RETURN
  894.  
  895. //-------------------------------------------------------------------
  896. //
  897. //  PROCEDURE wProc09()
  898. //
  899. //     Purpose: Display and Process GETs and PROMPTs
  900. //
  901. //----- Documented: 06-15-91 at 09:56:59pm --------------------------
  902. PROCEDURE wProc09()
  903. LOCAL GetTry1 := SPACE( 10 ), GetTry2 := SPACE( 15 )
  904. LOCAL GetTry3 := SPACE( 10 ), GetTry4 := SPACE( 12 )
  905. LOCAL GetList := {}, mChoice, tCursor, aMenu := {}
  906. twOpen( FULLSCREEN, MAINRED, 5, 6, "∙" )
  907. twTitle( "Get Processing",, "T", "C" )
  908. twSay( 21, 5, "  First Get Allows Digits Except '9'        ", CYH_RED )
  909. twSay( 22, 5, " Second Get is in Uppercase : ESC When Done ", CYH_RED )
  910. twInkeyWait( 1 )
  911.  
  912. KEYBOARD CHR( 32 ) + CHR( 32 ) + CHR( 32 ) + CHR( 32 )
  913. FourWin()
  914. twTitle( "Using twGet()",, "T", "C" )
  915. twClear( .F., " " )
  916. twCenter( 1, "Try entering data here:" )
  917. twSay( 3, 8, "Get #1:" )
  918. twSay( 5, 8, "Get #2:" )
  919. tCursor := SET( _SET_CURSOR, 1 )
  920.  
  921. twGet( 4, 9, {| cVal | IIF( cVal == NIL, GetTry1, GetTry1 := cVal )}, ;
  922.             "GetTry1", ;
  923.             GetList, ;
  924.             REPL( "9", LEN( GetTry1 )),,, ;
  925.             {|| !( "9" $ GetTry1 )} )
  926.  
  927. twGet( 6, 9, {| cVal | IIF( cVal == NIL, GetTry2, GetTry2 := cVal )}, ;
  928.             "GetTry2", ;
  929.             GetList, ;
  930.             "@!" )
  931.  
  932. IF nMainChoice == nMenuLen
  933.     KEYBOARD "12345" + CHR( 13 ) + "hello" + CHR( 13 )
  934. ENDIF
  935.  
  936. FOR nX = 1 to LEN( GetList );GetList[ nX ]:display();NEXT
  937. twReadModal( GetList );GetList := {}
  938.  
  939. IF nMainChoice == nMenuLen
  940.     twInkeyWait( 2 )
  941. ENDIF
  942.  
  943. twActivate( nWin3 )
  944. twTitle( "Using twSayGet()",, "T", "C" )
  945. twClear( .F., " " )
  946.  
  947. twCenter( 6, "Same Gets, Same Rules!" )
  948. twCenter( 8, "You can define the GET" )
  949. twCenter( 9, "However you want!" )
  950.  
  951. twSayGet( 3, 3, "Get Number 1:",,, ;
  952.                {| cVal | IIF( cVal == NIL, GetTry3, GetTry3 := cVal )}, ;
  953.                "GetTry3", ;
  954.                GetList, ;
  955.                REPL( "9", LEN( GetTry3 )),,, ;
  956.                {|| !( "9" $ GetTry3 )} )
  957.  
  958. twSayGet( 4, 3, "Get Number 2:",,, ;
  959.                {| cVal | IIF( cVal == NIL, GetTry4, GetTry4 := cVal )}, ;
  960.                "GetTry4", ;
  961.                GetList, ;
  962.                "@!" )
  963.  
  964. IF nMainChoice == nMenuLen
  965.     KEYBOARD "12345" + CHR( 13 ) + "hello" + CHR( 13 )
  966. ENDIF
  967.  
  968. FOR nX = 1 to LEN( GetList );GetList[ nX ]:display();NEXT
  969. twReadModal( GetList );GetList := {}
  970.  
  971. IF nMainChoice == nMenuLen
  972.     twInkeyWait( 2 )
  973. ENDIF
  974.  
  975. SET( _SET_CURSOR, tCursor )
  976.  
  977. twActivate( nWin2 )
  978. twTitle( "Using twPrompt() for Menus", BLA_WHI, "T", "C" )
  979. twTitle( " - Move : ┘ - Select", BLA_WHI, "B", "C" )
  980.  
  981. twPrompt( 02, 11, "This is Choice 1" )
  982. twPrompt( 04, 11, "This is Choice 2" )
  983. twPrompt( 06, 11, "This is Choice 3" )
  984.  
  985. IF nMainChoice == nMenuLen
  986.     KEYBOARD CHR( 24 ) + CHR( 13 )
  987. ENDIF
  988.  
  989. MENU TO mChoice
  990. twCenter( 09, "You Picked " + STRINT( mChoice ), WHH_VIH )
  991. twInkeyWait( 3 )
  992.  
  993. twActivate( nWin4 ) // To Look after the stack
  994. FOR nX = 1 TO 5
  995.     twPop()
  996.     twInkeyWait( .1 )
  997. NEXT
  998. RETURN
  999.  
  1000. //-------------------------------------------------------------------
  1001. //
  1002. //  PROCEDURE wProc10()
  1003. //
  1004. //     Purpose: Demonstrate Redisplay Feature
  1005. //              Pop up from the Stack
  1006. //
  1007. //----- Documented: 06-15-91 at 09:57:11pm --------------------------
  1008. PROCEDURE wProc10()
  1009. SET SCOREBOARD OFF
  1010. twOpen( FULLSCREEN, WHH_BLU, 5, 9, "" )
  1011. twTitle( "Redisplay from the Stack",, "T", "C" )
  1012. FournWin2()
  1013.  
  1014. twDisplay( nWin1 );twInkeyWait( .2 )
  1015. twDisplay( nWin3 );twInkeyWait( .2 )
  1016. twDisplay( nWin2 );twInkeyWait( .2 )
  1017. twDisplay( nWin4 );twInkeyWait( .2 )
  1018. twDisplay( nWin1 );twInkeyWait( .2 )
  1019. twDisplay( nWin3 );twInkeyWait( .2 )
  1020. twDisplay( nWin4 );twInkeyWait( .2 )
  1021. IF nMainChoice != nMenuLen
  1022.     @ twRow( 04 ), twCol( 2 ) SAY "  Shadows"
  1023.     @ twRow( 05 ), twCol( 2 ) SAY "Information"
  1024.     @ twRow( 06 ), twCol( 2 ) SAY "  Is Also"
  1025.     @ twRow( 07 ), twCol( 2 ) SAY "  Updated"
  1026.     @ twRow( 08 ), twCol( 2 ) SAY " ---------"
  1027.     @ twRow( 09 ), twCol( 2 ) SAY "  Try  it"
  1028.     @ twRow( 10 ), twCol( 2 ) SAY " Yourself!"
  1029.     @ twRow( 11 ), twCol( 2 ) SAY " ---------"
  1030.     @ twRow( 12 ), twCol( 2 ) SAY " With  F1"
  1031.     @ twRow( 13 ), twCol( 2 ) SAY "  F2, F3"
  1032.     @ twRow( 14 ), twCol( 2 ) SAY "  and F4"
  1033.     @ twRow( 15 ), twCol( 2 ) SAY " ---------"
  1034.     @ twRow( 16 ), twCol( 2 ) SAY "    ESC   "
  1035.     @ twRow( 17 ), twCol( 2 ) SAY " to go on "
  1036.  
  1037.     SET KEY 28 TO DnWin1
  1038.     SET KEY -1 TO DnWin2
  1039.     SET KEY -2 TO DnWin3
  1040.     SET KEY -3 TO DnWin4
  1041.  
  1042.     twInkeyWait( 60 )
  1043.  
  1044.     SET KEY 28 to
  1045.     SET KEY -1 to
  1046.     SET KEY -2 to
  1047.     SET KEY -3 to
  1048. ELSE
  1049.     twInkeyWait( 2 )
  1050. ENDIF
  1051. FOR nX = 1 TO 5
  1052.     twPop()
  1053. NEXT
  1054.  
  1055. RETURN
  1056.  
  1057. //-------------------------------------------------------------------
  1058. //
  1059. //  PROCEDURE wProc11()
  1060. //
  1061. //     Purpose: Demonstrate Window Activation Feature
  1062. //
  1063. //----- Documented: 06-15-91 at 09:57:23pm --------------------------
  1064. PROCEDURE wProc11()
  1065. LOCAL nCol, nRow, nPos, nCounter := 0, cTemp := '', nZ
  1066. LOCAL nWindow := 0, nFrame := 0, aHandle := {}
  1067.  
  1068. twOpen( FULLSCREEN, MAINRED, 5, 9, "" )
  1069. twTitle( "Window Activation Features",, "T", "C" )
  1070.  
  1071. FourWin()
  1072.  
  1073. twActivate( nWin1 )
  1074. Scroller()
  1075. twSave()
  1076.  
  1077. nPos := nRow := 0
  1078. FOR  nCol = 5 TO 55
  1079.     nRow := INT( nRow )
  1080.     IF nRow != nPos .AND. nRow != 3
  1081.         AADD( aHandle, twOpen( nRow, nCol, nRow + 5, nCol + 20, WHH_BLU, 6, 3 ))
  1082.         nFrame++
  1083.         nFrame := IIF( nFrame > 14, 1, nFrame )
  1084.         twFrame( nFrame )
  1085.         nWindow++
  1086.         cTemp := "Window " + STRINT( nWindow )
  1087.         twTitle( cTemp, BLU_CYH, "T", "C" )
  1088.         cTemp := "Frame " + STRINT( nFrame )
  1089.         twTitle( cTemp,, "B", "C" )
  1090.     ELSEIF nRow = 3
  1091.         nCounter++
  1092.         IF nCounter = 6
  1093.             AADD( aHandle, twOpen( nRow, nCol, nRow + 5, nCol + 20, WHH_BLU, 6, 3 ))
  1094.             nFrame++
  1095.             nFrame := IIF( nFrame > 14, 1, nFrame )
  1096.             twFrame( nFrame )
  1097.             nWindow++
  1098.             cTemp := "Window " + STRINT( nWindow )
  1099.             twTitle( cTemp, BLU_CYH, "T", "C" )
  1100.             cTemp := "Frame " + STRINT( nFrame )
  1101.             twTitle( cTemp,, "B", "C" )
  1102.         ENDIF
  1103.     ENDIF
  1104.     nPos := nRow
  1105. NEXT
  1106. twInkeyWait( .1 )
  1107. FOR  nX = 1 TO LEN( aHandle )
  1108.     twActivate( aHandle[ nX ] );twCenter( 1, "Active!" );twInkeyWait( .1 )
  1109.     IF nX = 8
  1110.         twActivate( nWin1 );Scroller()
  1111.     ELSEIF nX = 12
  1112.         twActivate( nWin2 );twInkeyWait( .1 )
  1113.         twCenter( 4, "My Turn!!" );twInkeyWait( 2 )
  1114.     ELSEIF nX = 23
  1115.         twActivate( nWin3 );twInkeyWait( .1 )
  1116.         twCenter( 4, "Butt out! My Turn!!" );twInkeyWait( 2 )
  1117.     ELSEIF nX = 26
  1118.         twActivate( nWin4 );twInkeyWait( .1 )
  1119.         twCenter( 4, "I'm Moving!!" );twInkeyWait( 2 )
  1120.         twMove( -10, -40 );twInkeyWait( .1 )
  1121.     ENDIF
  1122. NEXT
  1123. twInkeyWait( .1 )
  1124. FOR  nX = LEN( aHandle ) TO 1 STEP -1
  1125.     twActivate( aHandle[ nX ] );twCenter( 2, "And Again!!" );twInkeyWait( .1 )
  1126.     IF nX = 18
  1127.         twActivate( nWin1 );Scroller()
  1128.     ELSEIF nX = 12
  1129.         twActivate( nWin2 );twInkeyWait( .1 )
  1130.         twCenter( 6, "Stop Pushing!!" );twInkeyWait( 1 )
  1131.     ELSEIF nX = 10
  1132.         twActivate( nWin3 );twInkeyWait( .1 )
  1133.         twCenter( 6, "Quiet You!!" );twInkeyWait( 1 )
  1134.     ELSEIF nX = 5
  1135.         twActivate( nWin4 );twInkeyWait( .1 )
  1136.         twCenter( 6, "Ahhrrrghhh!!" );twInkeyWait( 1 )
  1137.         FOR  nZ = 1 TO 14
  1138.             twFrame( nZ, YEL_CYN );twInkeyWait( .1 )
  1139.         NEXT
  1140.     ENDIF
  1141. NEXT
  1142. twInkeyWait( 1 )
  1143. FOR  nX = 1 TO LEN( aHandle )
  1144.     twActivate( aHandle[ nX ] )
  1145.     twTitle( "How's That??", YEL_RED, "B", "C" )
  1146.     Inkey()
  1147. NEXT
  1148. twInkeyWait( 2 )
  1149. FOR  nX = 1 TO 5 + LEN( aHandle )
  1150.     twPop()
  1151.     Inkey()
  1152. NEXT
  1153.  
  1154. //*********************************
  1155. // frame testing
  1156. //*********************************
  1157. twOpen( FULLSCREEN, MAINBLU, 3, 3 )
  1158. twTitle( "Frames in Window Activation",, "T", "C" )
  1159. twInkeyWait( 1 )
  1160. twCenter( 2, "The Frame Colour may be passed as a two element array.", YEL_BLU )
  1161. twInkeyWait( 1 )
  1162. twCenter( 4, "This feature enables you define one colour for active", YEL_BLU )
  1163. twCenter( 5, "and another for inactive ones, much like Microsoft Windows!", YEL_BLU )
  1164. twInkeyWait( 1 )
  1165. twCenter( 7, "Try it and See!!", GNH_BLU )
  1166. twInkeyWait( 1 )
  1167. twLeft( 20, "        ACTIVE KEYS         ", WHH_VIH )
  1168. twLeft( 21, "       1,  2,  3,  4        ", BLA_CYH )
  1169. twLeft( 22, "       To Reactivate        ", BLA_CYH )
  1170. twLeft( 23, "        ESC to Exit         ", BLA_CYH )
  1171. twInkeyWait( 1 )
  1172.  
  1173. nWin1 := twOpen( 12, 31, 19, 62, WHI_RED, 3, 3,, { WHH_RED, WHI_RED } )
  1174. twTitle( "Win 1",, "T", "C" )
  1175. twCenter( 2, "Window 1" )
  1176.  
  1177. nWin2 := twOpen( 10, 52, 22, 69, BLA_CYN, 3, 3,, { WHH_CYN, WHI_CYN } )
  1178. twTitle( "Win 2",, "T", "C" )
  1179. twCenter( 2, "Window 2" )
  1180.  
  1181. nWin3 := twOpen( 8, 8, 17, 37, WHI_BLA, 3, 3,, { WHH_BLA, WHI_BLA } )
  1182. twTitle( "Win 3",, "T", "C" )
  1183. twCenter( 2, "Window 3" )
  1184.  
  1185. nWin4 := twOpen( 6, 33, 15, 59, WHI_VIO, 3, 3,, { WHH_VIO, WHI_VIO } )
  1186. twTitle( "Win 4",, "T", "C" )
  1187. twCenter( 2, "Window 4" )
  1188.  
  1189. IF nMainChoice != nMenuLen
  1190.     SET KEY 49 TO AnWin1;SET KEY 50 TO AnWin2
  1191.     SET KEY 51 TO AnWin3;SET KEY 52 TO AnWin4
  1192.     DO WHILE .T.
  1193.         twInkeyWait( 600 )
  1194.         IF LASTKEY() == 27
  1195.             EXIT
  1196.         ENDIF
  1197.     ENDDO
  1198.     SET KEY 49 to;SET KEY 50 to;SET KEY 51 to;SET KEY 52 to
  1199. ELSE
  1200.     Inkey( 1 );AnWin1()
  1201.     Inkey( 1 );AnWin3()
  1202.     Inkey( 1 );AnWin4()
  1203.     Inkey( 1 );AnWin2()
  1204.     Inkey( 2 )
  1205. ENDIF
  1206. FOR nX = 1 TO 5
  1207.     twPop()
  1208. NEXT
  1209. RETURN
  1210.  
  1211. //-------------------------------------------------------------------
  1212. //
  1213. //  PROCEDURE wProc12()
  1214. //
  1215. //     Purpose: Demonstrate Moving, Sliding and Sizing a Window
  1216. //
  1217. //----- Documented: 06-15-91 at 09:57:38pm --------------------------
  1218. PROCEDURE wProc12()
  1219. LOCAL nMainWin, nHandle
  1220. nMainWin := twOpen( FULLSCREEN, WHH_BLU, 5, 9, "" )
  1221. twTitle( "Moving, Sliding and Sizing Windows",, "T", "C" )
  1222. FournWin2()
  1223. nWin5 := twOpen( 2, 40, 12, 59, RED_YLH, 9, 2 );twTitle( "Win 5",, "T", "C" )
  1224. twSay( 2, 3, "Watch me move!" );twInkeyWait( 2 )
  1225. twSay( 2, 3, "38 Left       " );twInkeyWait( .3 )
  1226. twMove( 0, -38 );twInkeyWait( .3 )
  1227. twSay( 3, 3, "10 Down" );twInkeyWait( .3 )
  1228. twMove( 10, 0 );twInkeyWait( .3 )
  1229. twSay( 5, 3, "7 Up" );twSay( 6, 3, "30 Right" );twInkeyWait( .3 )
  1230. twMove( -7, 30 );twInkeyWait( 1 )
  1231. twPop()
  1232.  
  1233. nWin6 := twOpen( 8, 36, 15, 53, BLU_CYH, 1, 3 );twTitle( "Win 6",, "T", "C" )
  1234. twCenter( 2, "Watch me go!" );twInkeyWait( 2 )
  1235. twSlide( "L", 30 );twSlide( "D", 7 );twSlide( "R", 50 );twSlide( "U", 13 )
  1236. twSlide( "L", 5 );twSlide( "D", 7 );twSlide( "L", 45 );twSlide( "D", 4 )
  1237. twSlide( "R", 20 );twSlide( "U", 10 );twSlide( "R", 8 );twSlide( "D", 13 )
  1238. twSlide( "U", 8 );twSlide( " L", 30 );twSlide( "D", 5 );twSlide( "R", 55 )
  1239. twSlide( "D", 3 );twSlide( "L", 15 );twSlide( "U", 10 );twSlide( "L", 15 )
  1240. twSlide( "D", 8 ); twSlide( "U", 10 )
  1241. twCenter( 4, "How's That!" )
  1242. twInkeyWait( 1 )
  1243. IF nMainChoice != nMenuLen
  1244.     twClear( .F., " " );twCenter( 2, "Now, Try" );twCenter( 3, "Yourself" )
  1245.     twCenter( 4, "with the" );twCenter( 5, "Cursor Keys!" )
  1246.  
  1247.     SET KEY 5 TO Wup;SET KEY 24 TO Wdn;SET KEY 19 TO Wlt;SET KEY 4 TO Wrt
  1248.     SET KEY 1 TO Uplt;SET KEY 18 TO Uprt;SET KEY 6 TO Dnlt;SET KEY 3 TO Dnrt
  1249.  
  1250.     twInkeyWait( 60 )
  1251.  
  1252.     SET KEY 5 to;SET KEY 24 to;SET KEY 19 to;SET KEY 4 to
  1253.     SET KEY 1 to;SET KEY 18 to;SET KEY 6 to;SET KEY 3 to
  1254. ENDIF
  1255.  
  1256. twPop()
  1257.  
  1258. twOpen( 3, 3, 21, 75, CYH_RED, 3, 3 )
  1259. twTitle( "Window Sizing 1",, "T", "C" )
  1260. FOR nX = 1 TO 15
  1261.     twCenter( nX + 1, PADL( ALLTRIM( STR( nX )), 2, "0" ) +;
  1262.     "This is a test of the window re-sizing routine: Line " +;
  1263.     PADL( ALLTRIM( STR( nX )), 2, "0" ))
  1264. NEXT
  1265. twTitle( "Watch us Resize this Window!",, "B", "L" )
  1266. twInkeyWait( 1 )
  1267. twSize( "H", -50 );twSize( "V", -10 );twSize( "H", 30 );twSize( "V", 7 )
  1268. twInkeyWait( 1 )
  1269. twPop()
  1270.  
  1271. nHandle := _twHandle( nMainWin )
  1272. twLeft( 20, "        ACTIVE KEYS         ", WHH_VIH )
  1273. twLeft( 21, " Up, Dn, Lt, Rt to Move Window ", BLA_CYH )
  1274. twLeft( 22, " PgUp, PgDn, Home, End to Size ", BLA_CYH )
  1275. twLeft( 23, "        ESC to Exit         ", BLA_CYH )
  1276. twInkeyWait( 1 )
  1277. _twHandle( nHandle )
  1278. nWin6 := twOpen( 3, 13, 20, 35, BLU_CYN, 7, 7 )
  1279. twTitle( "Window Sizing 2",, "T", "C" )
  1280. twTitle( "Left",, "B", "L" )
  1281. FOR nX = 1 TO 14
  1282.     twCenter( nX + 1, "This is a test" + STRINT( nX ))
  1283. NEXT
  1284.  
  1285. IF nMainChoice != nMenuLen
  1286.     SET KEY K_PGDN  TO vplus;SET KEY K_PGUP  TO vminus
  1287.     SET KEY K_END   TO hplus;SET KEY K_HOME  TO hminus
  1288.     SET KEY K_UP    TO Wup;SET KEY K_DOWN  TO Wdn
  1289.     SET KEY K_LEFT  TO Wlt;SET KEY K_RIGHT TO Wrt
  1290.     DO WHILE .T.
  1291.         twInkeyWait( 60 )
  1292.         IF LASTKEY() == 27
  1293.             twPop()
  1294.             EXIT
  1295.         ENDIF
  1296.     ENDDO
  1297.     SET KEY K_PGDN TO;SET KEY K_PGUP TO;SET KEY K_END TO;SET KEY K_HOME TO
  1298.     SET KEY K_UP TO;SET KEY K_DOWN TO;SET KEY K_LEFT TO;SET KEY K_RIGHT TO
  1299. ELSE
  1300.     Inkey( 1 ); FOR nX = 1 TO 6; vminus(); NEXT
  1301.     Inkey( 1 ); FOR nX = 1 TO 6; hminus(); NEXT
  1302.     Inkey( 1 ); FOR nX = 1 TO 6; wlt();    NEXT
  1303.     Inkey( 1 ); FOR nX = 1 TO 3; wup();    NEXT
  1304.     Inkey( 1 ); FOR nX = 1 TO 6; vplus();  NEXT
  1305.     Inkey( 1 ); FOR nX = 1 TO 6; hplus();  NEXT
  1306.     INKEY( 1 );twPop()
  1307. ENDIF
  1308. FOR nX = 1 TO 5
  1309.     twPop()
  1310. NEXT
  1311. RETURN
  1312.  
  1313. //-------------------------------------------------------------------
  1314. //
  1315. //  PROCEDURE wProc13()
  1316. //
  1317. //     Purpose: Demonstrate twARPick and twDBPick
  1318. //
  1319. //----- Documented: 06-15-91 at 09:57:51pm --------------------------
  1320. PROCEDURE wProc13()
  1321. LOCAL MaCode, pColor, Ret_Val, x, r, c, GetList := {}
  1322. LOCAL GetTry1, GetTry2, OneCheck := .T.
  1323.  
  1324. twOpen( FULLSCREEN, WHH_BLU, 5, 9 )
  1325. twTitle( "User Definable Picklists",, "T", "C" )
  1326. twInkeyWait( 1 )
  1327. IF nMainChoice == nMenuLen
  1328.     twCenter( 1, "This Module Requires User Input.", YEL_BLU )
  1329.     Inkey( 2 )
  1330. ENDIF
  1331. twCenter( 2, "Watch how we get a picklist in a", CYH_BLU )
  1332. twCenter( 4, "CLIPPER WHEN condition.", CYH_BLU )
  1333. twInkeyWait( 1 )
  1334. twLeft( 16, " Alpha to Search" )
  1335. twLeft( 17, " Cursor keys Move Bar" )
  1336. twLeft( 18, " ALT U, J, N, H Move Box" )
  1337. twInkeyWait( 1 )
  1338.  
  1339. USE windemo INDEX windemo.ntx ALIAS codes NEW
  1340. SELECT codes
  1341.  
  1342. GetTry1 := SPACE( LEN( codes->codeshort ))
  1343. GetTry2 := SPACE( LEN( codes->codeshort ))
  1344.  
  1345. @ twRow( 10 ), twCol( 10 ) SAY "Getting.." GET GetTry1 PICTURE "@X" WHEN ;
  1346.                 CheckList( "codes", "codeshort", "Code;Description" )
  1347.  
  1348. @ twRow( 12 ), twCol( 10 ) SAY "Next One " GET GetTry2 PICTURE "@X" WHEN ;
  1349.                 CheckList( "codes", "codeshort", "Code Description" )
  1350.  
  1351. twInkeyWait( 1 )
  1352.  
  1353. twReadModal( GetList )
  1354. GetList := {}
  1355. twInkeyWait( 1 )
  1356.  
  1357. twCenter( 6, "An array may be processed in the same way.", CYH_BLU )
  1358.  
  1359. twInkeyWait( 1 )
  1360.  
  1361. MaCode := {}
  1362. pColor := { WHH_CYN, YEL_RED, BLA_WHI, YEL_RED, YEL_RED, YEL_CYN }
  1363. Ret_Val := 0
  1364.  
  1365. twLeft( 19, " SPACE to Tag/Untag" )
  1366. twLeft( 20, " F7 Tag All" )
  1367. twLeft( 21, " F8 Untag All" )
  1368. twLeft( 22, " F9 Swap Tagged/Untagged" )
  1369.  
  1370. //**************
  1371. // Fill Array
  1372. //**************
  1373. DBEVAL( { || AADD( MaCode, codes->codekey + "│" + codes->codeshort )} )
  1374.  
  1375. //***************
  1376. // Call Function
  1377. //***************
  1378. Ret_Val := twARPick( MaCode, "Code", ;
  1379.                     5, 25, pColor, 3, 6,, LEN( MaCode ), 1 )
  1380.  
  1381. IF LASTKEY() != 27
  1382.     x := 0; r := 1
  1383.     //*******************************
  1384.     // Process Return from twARPick()
  1385.     //*******************************
  1386.     twOpen( 8, 10, 20, 50, GNH_VIO, 5, 9 )
  1387.     twTitle( "Selections",, "T", "C" )
  1388.  
  1389.     FOR x = 1 TO LEN( MaCode )
  1390.         IF "√" $ MaCode[x]
  1391.             OneCheck := .F.
  1392.             @ twRow( r ), twCol( 2 )  SAY SUBSTR( MaCode[x], 1, LEN( MaCode[x] ) - 1 )
  1393.             r++
  1394.             IF r > 10
  1395.                 r := 1
  1396.                 @ ROW() + 1, twCol( 3 ) SAY "Press a key for more."
  1397.                 twInkeyWait( 10 )
  1398.                 twClear( .F., " " )
  1399.             ENDIF
  1400.         ENDIF
  1401.     NEXT
  1402.     IF OneCheck .AND. Ret_Val != 0
  1403.         @ twRow( r + 1 ), twCol( 2 ) SAY "You Picked only One:"
  1404.         @ twRow( r + 3 ), twCol( 2 ) SAY maCode[ Ret_Val ]
  1405.     ENDIF
  1406.     twInkeyWait( 2 )
  1407.     twPop()
  1408. ENDIF
  1409. twPop()
  1410. CLOSE DATA
  1411. RETURN
  1412.  
  1413. //-------------------------------------------------------------------
  1414. //
  1415. //  PROCEDURE wProc14()
  1416. //
  1417. //     Purpose: Instance Variables Demo
  1418. //
  1419. //----- Documented: 06-15-91 at 09:58:04pm --------------------------
  1420. PROCEDURE wProc14()
  1421. LOCAL nKey := 0
  1422. twOpen( FULLSCREEN, MAINRED, 5, 9, "+" )
  1423. twTitle( "Window Class Instance Variables",, "T", "C" )
  1424. twCenter( 22, PADC( "Press 1, 2, 3 or 4 to View Instance Variables", 70 ), CYH_RED )
  1425. twCenter( 23, PADC( "For Windows 1 to 4 : ESC When Done.", 70 ), CYH_RED )
  1426.  
  1427. KEYBOARD CHR( 32 ) + CHR( 32 ) + CHR( 32 ) + CHR( 32 )
  1428. FourWin()
  1429.  
  1430. IF nMainChoice != nMenuLen
  1431.     DO WHILE nKey != 27
  1432.         nKey:=twInkeyWait( 0 )
  1433.         IF nKey == 27
  1434.             EXIT
  1435.         ENDIF
  1436.         IF ( nKey >= 49 ) .AND. ( nKey <= 52 )
  1437.             IF nKey == 49
  1438.                 twActivate( nWin1 )
  1439.             ELSEIF nKey == 50
  1440.                 twActivate( nWin2 )
  1441.             ELSEIF nKey == 51
  1442.                 twActivate( nWin3 )
  1443.             ELSEIF nKey == 52
  1444.                 twActivate( nWin4 )
  1445.             ENDIF
  1446.  
  1447.             twInkeyWait( 1 )
  1448.             nKey := ChkInst()
  1449.             IF ( nKey >= 49 ) .AND. ( nKey <= 52 )
  1450.                 KEYBOARD CHR( nKey )
  1451.             ENDIF
  1452.         ENDIF
  1453.     ENDDO
  1454. ELSE
  1455.     Inkey( 1 ); twActivate( nWin1 ); Inkey( 1 ); ChkInst()
  1456.     Inkey( 1 ); twActivate( nWin3 ); Inkey( 1 ); ChkInst()
  1457.     Inkey( 1 ); twActivate( nWin2 ); Inkey( 1 ); ChkInst()
  1458.     Inkey( 1 ); twActivate( nWin4 ); Inkey( 1 ); ChkInst()
  1459. ENDIF
  1460.  
  1461. FOR nX = 1 to 5
  1462.     twPop()
  1463. NEXT
  1464. RETURN
  1465.  
  1466. //-------------------------------------------------------------------
  1467. //
  1468. //  PROCEDURE wProc15()
  1469. //
  1470. //     Purpose: Display the Quick Reference .DOC File
  1471. //
  1472. //----- Documented: 06-15-91 at 09:58:16pm --------------------------
  1473. PROCEDURE wProc15()
  1474. LOCAL  f
  1475. IF nMainChoice = nMenuLen
  1476.     KEYBOARD REPL( CHR( 24 ), 25 ) + REPL( CHR( 19 ), 5 )+CHR( 27 )
  1477. ENDIF
  1478.  
  1479. twTextFile( FULLSCREEN, "TSWINQRF.DOC", MAINBLU, ;
  1480.            0, 9, YEL_BLU, "TSDWIN Quick Reference" )
  1481. RETURN
  1482.  
  1483. //-------------------------------------------------------------------
  1484. //
  1485. //  PROCEDURE wProc16()
  1486. //
  1487. //     Purpose: Demonstrate messages and alerts and other classes
  1488. //
  1489. //----- Documented: 06-15-91 at 09:58:28pm --------------------------
  1490. PROCEDURE wProc16()
  1491. LOCAL lExit := .F., nGetExit
  1492. LOCAL aActionKeys :=   {{ 1, { || BStuff01() }},;
  1493.                        { 2, { || BStuff02() }},;
  1494.                        { 3, { || BStuff03() }},;
  1495.                        { 4, { || BStuff04() }},;
  1496.                        { 5, { || BStuff05() }},;
  1497.                        { 6, { || BStuff06() }},;
  1498.                        { 7, { || BStuff07() }},;
  1499.                        { 8, { || BStuff08()   }}}
  1500.  
  1501. twExplode( .T. )
  1502. //------------------------------------------------------------------------
  1503. // Open BIG Stuff Display Window
  1504. //------------------------------------------------------------------------
  1505. twOpen( FULLSCREEN, BLU_YLH, 5, 10, "∙" )
  1506. twExplode( .F. )
  1507. twTitle( "TSDWIN Big Stuff", BLU_WHI, "T", "C" )
  1508.  
  1509. DO WHILE !lExit
  1510.  
  1511.     twButtonBox( "V", ;
  1512.                "Welcome to the TSDWIN BIG Stuff Demonstration. "+ ;
  1513.                "The functions shown here are available but NOT "+ ;
  1514.                "linked unless you need them. "+ ;
  1515.                "With TSDWIN.LIB looking after the details, you get "+ ;
  1516.                "more time to look after the important part of "+ ;
  1517.                "your application... The Data!", ;
  1518.                "This is a twButtonBox() Menu",, ;
  1519.                { "Alert Functions", ;
  1520.                  "Message Functions", ;
  1521.                  "Area Message Functions", ;
  1522.                  "DBF and Array Browsers", ;
  1523.                  "Indexing", ;
  1524.                  "Calculator", ;
  1525.                  "Calendar", ;
  1526.                  "Hardware Stuff", ;
  1527.                  "Main Menu" },, ;
  1528.                2, 15, 22, 65, 3, 8,, aActionKeys )
  1529.  
  1530.     nGetExit := twButtonBox( "H", ;
  1531.                           "Second Chance????", ;
  1532.                           "Exit BIG Stuff",, ;
  1533.                           { "Continue", ;
  1534.                             "Main Menu" },, ;
  1535.                           8, 15, 14, 65, 3, 8 )
  1536.  
  1537.     IF nGetExit = 2
  1538.         lExit := .T.
  1539.     ENDIF
  1540.  
  1541. ENDDO
  1542.  
  1543. twPop()
  1544. RETURN
  1545.  
  1546. //-------------------------------------------------------------------
  1547. //
  1548. //  PROCEDURE BStuff01()
  1549. //
  1550. //     Purpose: Alert Functions
  1551. //
  1552. //----- Documented: 09-29-91 at 11:36:12am --------------------------
  1553. PROCEDURE BStuff01()
  1554. LOCAL RetVal, cClrTemp
  1555. LOCAL aActionKeys := { { 1, { || Action1(), __keyboard() }}, ;
  1556.                       { 2, { || Action2(), __keyboard() }}, ;
  1557.                       { 3, { || Action3(), __keyboard() }}, ;
  1558.                       { 4, { || Action4(), __keyboard() }}}
  1559. LOCAL AText1 := ;
  1560.       "One function is used in TSDWIN to create various types of " + ;
  1561.       "alert boxes: PushButton Boxes, Radio Boxes and Select Boxes. " + ;
  1562.       "Default buttons are created of none are passed, or, if passed " + ;
  1563.       "as an array, buttons are created and displayed. In the case of " + ;
  1564.       "PushButtons, they are shadowed with a thin shadow of the same " + ;
  1565.       "type as the controlling window. The frame type is the same as " + ;
  1566.       "that of the controlling window. The colour for each type of box " + ;
  1567.       "defaults to an initial value, but is defineable. Shadow and frame " + ;
  1568.       "type are defineable with each function call. The Buttons, or other " + ;
  1569.       "select devices may be positioned horizontally or vertically."
  1570. LOCAL ATEXT2 := ;
  1571.       "The return values are, for twButtonBox() and twRadioBox(), the element " + ;
  1572.       "of the array in which the buttons are held. For twCheckBox(), an array " + ;
  1573.       "of checked elements is returned. All three of these functions act " + ;
  1574.       "like similar constructs in MS-Windows. For the twButtonBox() function, " + ;
  1575.       "the default Exit key is the Enter or Escape key. For twCheckBox() and " + ;
  1576.       "twRadioBox(), Enter or Space toggles the selection and the Escape key " + ;
  1577.       "exits the routine. Only SINGLE choices are allowed with twButtonBox() " + ;
  1578.       "and twRadioBox(). Multiple choices are allowed with twCheckBox(). " + ;
  1579.       "You may pass either new Exit keys or additonal " + ;
  1580.       "Action keys to the function. With this feature, you may use any one " + ;
  1581.       "of these functions to present a pop-up menu with very little " + ;
  1582.       "code. The menu choice can then be simply the function itself. With " + ;
  1583.       "Action keys, you can extend the usefulness of these functions in any " + ;
  1584.       "number of ways. More examples will be available on the TSD support " + ;
  1585.       "board."
  1586. LOCAL AText3 := ;
  1587.       "Watch while we demonstrate the same functions called with a vertical " + ;
  1588.       "configuration. Remember, all that need be passed is the message text " + ;
  1589.       "and an array of choices! We'll show the RETURN values with another " + ;
  1590.       "TSDWIN Messaging function twInfo(), after you make a selection."
  1591. twExplode( .T. )
  1592. twOpen( FULLSCREEN, RED_CYN, 5, 4 )
  1593. twExplode( .F. )
  1594. twTitle( "TSDWIN Alert Functions",, "T", "C" )
  1595. CLEAR TYPEAHEAD
  1596. twInkeyWait( 2 )
  1597. twCenter( 02, "Our Alert Box Functions are Completely", RED_CYN )
  1598. twCenter( 03, "Flexible and May be Made to Conform to a Global Window", RED_CYN )
  1599. twCenter( 04, "Design you Already Use.", RED_CYN )
  1600. twInkeyWait( 4 )
  1601. twCenter( 06, "ALERT Function Descriptions", YEL_CYN )
  1602. twInkeyWait( 2 )
  1603. twSay( 8, 14, "twButtonBox() - Display a message. Create and display an array", BLA_CYN )
  1604. twSay( 9, 14, "              of Shadowed PushButtons. Return Array Element.", BLA_CYN )
  1605. twInkeyWait( 2 )
  1606. twSay( 11, 14, "twRadioBox()  - Display a message. Create and display an array", BLA_CYN )
  1607. twSay( 12, 14, "              of Radio Selections. Return Array Element.", BLA_CYN )
  1608. twInkeyWait( 2 )
  1609. twSay( 14, 14, "twCheckBox()  - Display a message. Create and display an array", BLA_CYN )
  1610. twSay( 15, 14, "              of Select Boxes. Multiple choices allowed. This", BLA_CYN )
  1611. twSay( 16, 14, "              function returns an array of choices.", BLA_CYN )
  1612. twInkeyWait( 2 )
  1613. twCenter( 19, "Colours for the above may be changed on the fly.", BLA_CYN )
  1614. twCenter( 20, "Frame and shadow type default to those for the current window.", BLA_CYN )
  1615. twInkeyWait( 2 )
  1616. twCenter( 22, " Press a Key or Wait!! ", GRN_YLH )
  1617. twInkeyWait( 10 )
  1618. twButtonBox( "H", AText1, "twButtonBox() with Defaults", 3 )
  1619. CLEAR TYPEAHEAD
  1620.  
  1621. twCheckBox( "H", ;                                // Style
  1622.           AText1, ;                             // Message
  1623.           "twCheckBox() with Custom Features",, ; // Title ( No Button Number )
  1624.           { "Check", "As", "Many", ;            // Button
  1625.             "As", "You", "Want" }, ;            //   Array
  1626.           2, 3, 5, 18, 74, 3, 6 )               // Start, Coords, Shadow, Frame
  1627. CLEAR TYPEAHEAD
  1628.  
  1629. twRadioBox( "H", ;                                // Style
  1630.           AText2, ;                             // Message
  1631.           "This Uses twRadioBox()",, ;            // Title ( No Button Number )
  1632.           { "What's On", "The Radio", ;         // Button
  1633.             "Tonight", "Dear" }, ;              //   Array
  1634.           3, 2, 3, 21, 76, 7, 6 )               // Start, Coords, Shadow, Frame
  1635. CLEAR TYPEAHEAD
  1636.  
  1637. RetVal := twCheckBox( "V", ;
  1638.           AText3, ;
  1639.           "Here's twCheckBox() Vertical",, ;
  1640.           { "Who Says", "You Can", "Only Pick", "One??" }, ;
  1641.           1,, 7,, 71, 1, 6 )
  1642. CheckRtn( RetVal )
  1643. CLEAR TYPEAHEAD
  1644.  
  1645. RetVal := twRadioBox( "V", ;
  1646.           AText3, ;
  1647.           "I Know Why These are Called Radio Boxes!",, ;
  1648.           { "WKRP", "CHFI", "WNYC", "CKFM", "C100", "TSDL" }, ;
  1649.           5, 2, 5, 16, 54, 1, 6 )
  1650. CheckRtn( RetVal )
  1651. CLEAR TYPEAHEAD
  1652.  
  1653. RetVal := twButtonBox( "V", ;
  1654.           AText3 + " Have a look at the DEMO to see how easy " + ;
  1655.           "it is to do things like this!", ;
  1656.           "LISTEN HERE!",, ;
  1657.           {"Well Now", ;
  1658.            "It's About Time", ;
  1659.            "We Got", ;
  1660.            "A Few Things Straight, Dont' You?", ;
  1661.            "TSDWIN Can", ;
  1662.            "Make Your Life Easier", ;
  1663.            "And Your Applications", ;
  1664.            "More Coherent", ;
  1665.            "Have No Doubt About That" }, ;
  1666.            5, 2, 6, 22, 72, 7, 6 )
  1667. CheckRtn( RetVal )
  1668. CLEAR TYPEAHEAD
  1669.  
  1670. RetVal := twButtonBox( "V", ;
  1671.           "We'll Use a twButtonBox to demonstrate the other " + ;
  1672.           "messaging functions in TSDWIN. In this demo we " + ;
  1673.           "are using Action keys passed as code blocks to the " + ;
  1674.           "twButtonBox() function. Action keys allow you to make " + ;
  1675.           "a menu choice perform a task instead of returning " + ;
  1676.           "an Exit key.", ;
  1677.           "Displaying Messages",, ;
  1678.           { "twInfo()", "twWarn()", "twInquire()", "twTextMsg()", "Exit" }, ;
  1679.           1,, 10, 15,, 1, 6,, aActionKeys )
  1680.  
  1681. cClrTemp := twAlertInit( 1, IIF( ! lMono, "gr+/rb, gr+/bg,,, gr+/b", "w+/n, n/w,,, w/n" ))
  1682. CLEAR TYPEAHEAD
  1683.  
  1684. twButtonBox( "H", "Now, wasn't that fun? You have seen some of the best Clipper functions"+;
  1685.           " ever made. There will be more on the way, including Mouse Support. "+;
  1686.           " TSD Ltd. will also be the first to provide Clipper users with a pseudo-object which turns lead into"+;
  1687.           " gold, with the correct parameters! The parameter list will be supplied on"+;
  1688.           " registration. One of the parameters will trigger a previously undocumented DOS"+;
  1689.           " interrupt which starts a process rolling which will ultimately set the lead into gold routine into motion."+;
  1690.           " After a suitable processing time, thin sheets of pure gold will start issuing"+;
  1691.           " from the access door of the floppy drive designated as 'A' on your machine. "+;
  1692.           " TSD recommends you advise your customers to have Brinks on hand when using this function."+;
  1693.           " Please be warned that this particular routine may fail with some combinations of hardware."+;
  1694.           " This routine has been tested on some types of hardware."+;
  1695.           " Consult your hardware dealer for details about your BIOS if it doesn't work for you...", "GOLD! GOLD!! GOLD!!!", ;
  1696.           1,,, 2, 5, 22, 75, 1, 4 )
  1697.  
  1698. twAlertInit( 1, cClrTemp )
  1699. twPop()
  1700. CLEAR TYPEAHEAD
  1701. RETURN
  1702.  
  1703. //-------------------------------------------------------------------
  1704. //
  1705. //  PROCEDURE BStuff02()
  1706. //
  1707. //     Purpose: Messages
  1708. //
  1709. //----- Documented: 09-29-91 at 11:56:23am --------------------------
  1710. PROCEDURE BStuff02()
  1711. LOCAL amArray := {"Yes","No","Maybe"}, nMenuChoice
  1712. LOCAL sType := 3, fType := 9, Var2Read := SPACE( 20 ), Var2 := SPACE( 20 )
  1713. twExplode( .T. )
  1714. twOpen( FULLSCREEN, MAINBLU, 5, 4 )
  1715. twExplode( .F. )
  1716. twTitle( "TSDWIN Message Functions",, "T", "C" )
  1717. CLEAR TYPEAHEAD
  1718. twInkeyWait( 2 )
  1719. twCenter( 02, "Our PopUp Message Functions are Completely", YEL_BLU )
  1720. twCenter( 03, "Flexible and May be Made to Conform to a Global Window", YEL_BLU )
  1721. twCenter( 04, "Design you Already Use. These functions use MOST of the", YEL_BLU )
  1722. twCenter( 05, "attributes of the WINDOW Class.", YEL_BLU )
  1723. twInkeyWait( 4 )
  1724. twCenter( 07, "MESSAGE Function Descriptions", WHH_BLU )
  1725. twInkeyWait( 2 )
  1726. twSay( 09, 16, "twTextMsg()    - Wraps text in a Pop Up box.      ", BLA_YLH )
  1727. twInkeyWait( 2 )
  1728. twSay( 11, 16, "twWarn()      - Post a Pop Up Warning Message.   ", BLA_YLH )
  1729. twInkeyWait( 2 )
  1730. twSay( 13, 16, "twInfo()      - Pop Up Informative Message.      ", BLA_YLH )
  1731. twInkeyWait( 2 )
  1732. twSay( 15, 16, "twInquire()   - Kind of Like a SAY/GET in a box. ", BLA_YLH )
  1733. twInkeyWait( 2 )
  1734. twSay( 17, 16, "twPopMenu()   - Kind of Like a MENU TO in a box. ", BLA_YLH )
  1735. twInkeyWait( 2 )
  1736. twSay( 19, 16, "twPopChoice() - Kind of Like a ACHOICE in a box. ", BLA_YLH )
  1737. twInkeyWait( 2 )
  1738. twCenter( 21, "Colours for the above may be changed on the fly.", YEL_BLU )
  1739. twCenter( 22, "Frame and shadow type default to those for the current window.", YEL_BLU )
  1740. twInkeyWait( 2 )
  1741. twCenter( 23, " Press a Key or Wait!! ", GRN_YLH )
  1742. twInkeyWait( 10 )
  1743.  
  1744. twWarn( " Trying a Warning Message ",,,,, sType, fType )
  1745. twInfo( " Trying an Info Message ",,,,, sType, fType )
  1746. twTextMsg("Trying a Text Message. With this one we have to have the thing do a word"+;
  1747.         "wrap to put it into the box.",,,5,5,15,45,, sType, fType )
  1748.  
  1749. twInquire( {"Trying out an Inquire Message:",;
  1750.            "Let's see if more lines will work out OK too?",;
  1751.            "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13",;
  1752.            "";
  1753.            },, Var2Read,,, sType, fType )
  1754.  
  1755. twInquire( "Trying out another Inquire Message:","Trying", Var2 )
  1756.  
  1757. twInfo( {" Trying an Info Message ",;
  1758.        "Item 1",;
  1759.        "Item 2",;
  1760.        "Item 3",;
  1761.        "Item 4",;
  1762.        "Item 5",;
  1763.        "Item 6",;
  1764.        "Item 7",;
  1765.        "Item 8",;
  1766.        "Item 9",;
  1767.        "Item 10",;
  1768.        "Item 11",;
  1769.        "Item 12";
  1770.         };
  1771.        ,,,,, sType, fType )
  1772.  
  1773. twMsgInit( 1, "gr+/r,w/n,,,w+/n" )
  1774.  
  1775. twInfo( {" Trying an Info Message ",;
  1776.        "Item 1",;
  1777.        "Item 2",;
  1778.        "Item 3",;
  1779.        "Item 4",;
  1780.        "Item 5",;
  1781.        "Item 6",;
  1782.        "Item 7";
  1783.         };
  1784.        ,,,,, sType, fType )
  1785. CLEAR TYPEAHEAD
  1786.  
  1787. amArray := {"Modify","Save","Abandon"}
  1788. //twPopMenu( amArray, cHeader, aMsg, wT, wL, nChoice, wColor, ;
  1789. //                    wsType, wfType, wFColor, wTColor, nRowSkip )
  1790. nMenuChoice := twPopMenu( amArray, "Select",, 5, 10, 2, ;
  1791.                                 MAINBLU, 3, 5,, 2 )
  1792. twInfo( "You Chose: " + STRINT( nMenuChoice ))
  1793. twInkeyWait( 3 )
  1794. CLEAR TYPEAHEAD
  1795.  
  1796. amArray := {"Making PopUp Menus is","Really Easy","With TSDWIN"}
  1797. nMenuChoice := twPopMenu( amArray, "twPopMenu()",,,, 2, MAINBLU, 3, 5,, 2 )
  1798. twInfo("You Chose: " + STRINT( nMenuChoice ) )
  1799.  
  1800. AADD( amArray, "Trash" )
  1801. AADD( amArray, "Hide Under the Rug" )
  1802. twInkeyWait(0)
  1803. CLEAR TYPEAHEAD
  1804.  
  1805. nMenuChoice := twPopChoice( amArray, "twPopChoice()",,,,, 9, 9 )
  1806. twInfo("You Chose: " + STRINT( nMenuChoice ) )
  1807. twInkeyWait( 3 )
  1808.  
  1809. twPop()
  1810. CLEAR TYPEAHEAD
  1811.  
  1812. RETURN
  1813.  
  1814. //-------------------------------------------------------------------
  1815. //
  1816. //  PROCEDURE BStuff03()
  1817. //
  1818. //     Purpose: Area Message Functions
  1819. //
  1820. //----- Documented: 09-29-91 at 12:03:31pm --------------------------
  1821. PROCEDURE BStuff03()
  1822. twExplode( .T. )
  1823. twOpen( FULLSCREEN, YEL_GRN, 5, 4 )
  1824. twExplode( .F. )
  1825. twTitle( "TSDWIN Area Message Functions",, "T", "C" )
  1826. CLEAR TYPEAHEAD
  1827. twInkeyWait( 2 )
  1828. twCenter( 02, "Our Area Message Functions are Completely", YEL_GRN )
  1829. twCenter( 03, "Flexible and May be Made to Conform to a user-defineable", YEL_GRN )
  1830. twCenter( 04, "colour and placement schemes.", YEL_GRN )
  1831. twInkeyWait( 4 )
  1832. twCenter( 06, "AREA MESSAGE Function Descriptions", YEL_CYN )
  1833. twInkeyWait( 2 )
  1834. twSay( 08, 16, "twWarnLine() - Post a Warning Message in Message Area. ", BLA_YLH )
  1835. twInkeyWait( 2 )
  1836. twSay( 10, 16, "twInfoLine() - Informative Message in Message Area.    ", BLA_YLH )
  1837. twInkeyWait( 2 )
  1838. twSay( 14, 16, "These functions can be made to operate in a number    ", BLA_YLH )
  1839. twSay( 15, 16, "of different ways!                                    ", BLA_YLH )
  1840. twInkeyWait( 2 )
  1841. twCenter( 22, " Press a Key or Wait!! ", GRN_YLH )
  1842. twInkeyWait( 10 )
  1843. twInfoLine( 5, "twInfoLine() Puts Messages in a Pre-Defined Area. ( Any Key )" , "L" )
  1844. twInfoLine( 5, "You Pick the Justification ( Any Key )" , "C" )
  1845. twInfoLine( 5, "You can also Change the Area! ( Any Key )" , "R", 12 )
  1846. twInfoLine( 5, "You can have «TWO» Colour Attributes too! ( «Any Key» )" , "P" )
  1847. twWarnLine( 5, "twWarnLine() is the same «EXCEPT» for the default colour." , "P" )
  1848. BEEPER
  1849. twInkeyWait( 3 )
  1850. twPop()
  1851. RETURN
  1852.  
  1853. //-------------------------------------------------------------------
  1854. //
  1855. //  PROCEDURE BStuff04()
  1856. //
  1857. //     Purpose: Browsers
  1858. //
  1859. //----- Documented: 09-29-91 at 12:07:10pm --------------------------
  1860. PROCEDURE BStuff04()
  1861. LOCAL TopBlock, BotBlock, ScopeBlock
  1862. LOCAL wT := 3, wL := 5, wB := 20, wR := 74
  1863. LOCAL wColor := IIF( ! lMono, "w+/rb,b/w,,gr+/rb,bg+/b", "w+/n,n/w,,n/w,w/n" )
  1864. LOCAL sType := 3, fType := 4, Editflag := .T.
  1865. LOCAL wfColor := IIF( ! lMono, "gr+/rb", "w+/n" )
  1866. LOCAL columns := NIL, aActionKeys := NIL, Footers := NIL
  1867. LOCAL ColHead := ""
  1868. LOCAL tArray :={}, f
  1869. FIELD codekey, codeshort, continent
  1870.  
  1871. twExplode( .T. )
  1872. twOpen( FULLSCREEN, YEL_GRN, 5, 4 )
  1873. twExplode( .F. )
  1874. twTitle( "TSDWIN DBF and Array Browsers",, "T", "C" )
  1875. CLEAR TYPEAHEAD
  1876. twInkeyWait( 2 )
  1877. twCenter( 02, "Our Browse Functions are designed to allow the programmer", YEL_GRN )
  1878. twCenter( 03, "all the possibilties allowed in the TBrowse system, but", YEL_GRN )
  1879. twCenter( 04, "without the pain. You can also pass executable code into", YEL_GRN )
  1880. twCenter( 05, "the browse.", YEL_GRN )
  1881. twInkeyWait( 4 )
  1882. twCenter( 07, "DBF and Array Browser Decsriptions", YEL_CYN )
  1883. twInkeyWait( 2 )
  1884. twSay( 09, 16, "twDBrowse() - Construct and operate a batabase browse. ", BLA_YLH )
  1885. twInkeyWait( 2 )
  1886. twSay( 11, 16, "twArBrowse() - Construct and operate an array browse.  ", BLA_YLH )
  1887. twInkeyWait( 2 )
  1888. twSay( 13, 16, "Both functions have ancillary support functions to get", BLA_YLH )
  1889. twSay( 14, 16, "references to the browse object. Calls to twDBrowse()  ", BLA_YLH )
  1890. twSay( 15, 16, "can be nested.                                        ", BLA_YLH )
  1891. twInkeyWait( 2 )
  1892. twCenter( 22, " Press a Key or Wait!! ", GRN_YLH )
  1893. twInkeyWait( 10 )
  1894. USE windemo INDEX windemo ALIAS Windemo NEW
  1895. TopBlock   := {|| codekey = "B" }
  1896. BotBlock   := {|| codekey = "P" }
  1897. ScopeBlock := {|| codekey >= "B" .AND. codekey <= "P" }
  1898.  
  1899. // position record pointer within scope
  1900. GO TOP
  1901. SEEK "B"
  1902.  
  1903. columns := {}
  1904. AADD( Columns, TBColumnNew( "Code;Key", FIELDBLOCK( "codekey" ) ))
  1905. AADD( Columns, TBColumnNew( "Code;Description", FIELDBLOCK( "codeshort" ) ))
  1906.  
  1907.  
  1908. twInfoLine( -2, "A «Scoped» DBF Browse ( Between B and P ) - «F1» for Help «ALPHA» Search", "P" )
  1909. twDBrowse( wT, wL, wB, wR, columns, "Scoped Browse", footers, TopBlock, BotBlock, ;
  1910.             ScopeBlock, EditFlag, aActionKeys, wColor, 3, 2, wFcolor, ;
  1911.             .T., .T., .T. )
  1912. twAMPop()
  1913.  
  1914. Columns := NIL
  1915. TopBlock   := NIL
  1916. BotBlock   := NIL
  1917. ScopeBlock := NIL
  1918.  
  1919. twInfoLine( -2, "A «Full» DBF Browse - «F1» for Help «ALPHA» Search", "P" )
  1920. twDBrowse( 0, 0, MAXROW() - 1, MAXCOL(), columns, "Full Browse", footers, TopBlock, ;
  1921.             BotBlock, ScopeBlock, EditFlag, aActionKeys, wColor, 3, 4, ;
  1922.             wFcolor , .T., .T., .T., 2 )
  1923. twAMPop()
  1924.  
  1925. tArray := {}
  1926. DBEVAL( {|| AADD( tArray, Windemo->Codeshort + " │ " + Windemo->Continent )})
  1927.  
  1928. twInfoLine( -2, "An «Array» Browse with twArBrowse() - «F1» for Help «ALPHA» Search", "P" )
  1929. twArBrowse( wT, wL, wB, wR, tArray, "Array from a DBF",,,,, ;
  1930.                             MAINBRN, 3, 1 )
  1931. twAMPop()
  1932.  
  1933. tArray := DIRECTORY("*.*")
  1934.  
  1935. twInfoLine( -2, "A «Directory» with twArBrowse() - «F1» for Help «ALPHA» Search", "P" )
  1936. twArBrowse( wT, wL, wB, wR, tArray, "Directory of Files in " + CURDIR() ;
  1937.                             ,{"File Name","Size","Date","Time","Attribute"},,,, MAINCYN, 3, 1 )
  1938. twAMPop()
  1939. twPop()
  1940. CLOSE DATA
  1941. CLEAR TYPEAHEAD
  1942.  
  1943. RETURN
  1944.  
  1945. //-------------------------------------------------------------------
  1946. //
  1947. //  PROCEDURE BStuff05()
  1948. //
  1949. //     Purpose: Indexing
  1950. //
  1951. //----- Documented: 09-29-91 at 12:07:46pm --------------------------
  1952. PROCEDURE BStuff05()
  1953. LOCAL aNtxArray := {}
  1954. twExplode( .T. )
  1955. twOpen( FULLSCREEN, RED_CYN, 5, 4 )
  1956. twExplode( .F. )
  1957. twTitle( "TSDWIN twIndexMaker() Window Function",, "T", "C" )
  1958. CLEAR TYPEAHEAD
  1959. twInkeyWait( 2 )
  1960. twCenter( 02, "The TSDWIN Indexer makes use of the new GaugeBar Class.", RED_CYN )
  1961. twCenter( 03, "It gives your users what they want to see... what's", RED_CYN )
  1962. twCenter( 04, "going on... and frees you from the drudgery of creating", RED_CYN )
  1963. twCenter( 05, "needed but complex routines.", RED_CYN )
  1964. twInkeyWait( 4 )
  1965. twCenter( 07, "twIndexMaker Function Description", YEL_CYN )
  1966. twInkeyWait( 2 )
  1967. twSay( 09, 16, "Watch how these two lines of code operate:", BLA_YLH )
  1968. twSay( 11, 6, "AADD( aNtxArray, { 'Windemo', 'Windemo', 'C', 'UPPER( CodeKey )' }) ", BLA_YLH )
  1969. twSay( 13, 6, "twIndexMaker( aNtxArray,,,,, MAINBLU, 3, 4, ; ", BLA_YLH )
  1970. twSay( 14, 16, "'Handy Index Maker',, .F. ) ", BLA_YLH )
  1971. twInkeyWait( 2 )
  1972. twCenter( 22, " Press a Key or Wait!! ", GRN_YLH )
  1973. twInkeyWait( 10 )
  1974.  
  1975. AADD( aNtxArray, { "Windemo", "Windemo",   "C", "UPPER( CodeKey )" } )
  1976.  
  1977. twIndexMaker( aNtxArray,,,,, MAINBRN, 3, 4, ;
  1978.                "Handy Index Maker",, .F. )
  1979. twCenter( 16, "How was That??", RDH_YLH )
  1980. twInkeyWait( 3 )
  1981. twPop()
  1982. RETURN
  1983.  
  1984. //-------------------------------------------------------------------
  1985. //
  1986. //  PROCEDURE BStuff06()
  1987. //
  1988. //     Purpose: Calculator
  1989. //
  1990. //----- Documented: 09-29-91 at 12:33:49pm --------------------------
  1991. PROCEDURE BStuff06()
  1992. LOCAL nKey, nGetTry := 0, GetList := {}
  1993. SETCOLOR( IIF( ! lMono, 'n/bg', 'w/n' ))
  1994. twExplode( .T. )
  1995. twOpen( ,,,,,,, '' )
  1996. twOpen( 5, 10, 19, 69, MAINBLU, 3, 4 )
  1997. twExplode( .F. )
  1998. twTitle( 'TSD twCalculator()', '', 'T', 'C' )
  1999. twTitle( 'Shift-F1 to Call Calculator', '', 'B', 'C' )
  2000. twCalcInit( 2, 3, MAINCLC, 3, 10, .T. )
  2001. SET KEY K_SH_F1 TO twCallCalc()
  2002.  
  2003. DO WHILE .T.
  2004.     @ twRow( 4 ), twCol( 10 ) SAY "Get a Value" GET nGetTry PICTURE "##########.####"
  2005.     twReadModal( GetList ); GetList := {}
  2006.  
  2007.     IF LASTKEY() == K_ESC
  2008.         EXIT
  2009.     ENDIF
  2010.  
  2011. ENDDO
  2012.  
  2013. SET KEY K_SH_F1 TO
  2014. twPop(); twPop()
  2015.  
  2016. RETURN
  2017.  
  2018. //-------------------------------------------------------------------
  2019. //
  2020. //  PROCEDURE BStuff07()
  2021. //
  2022. //     Purpose: Calendar
  2023. //
  2024. //----- Documented: 09-29-91 at 12:33:57pm --------------------------
  2025. PROCEDURE BStuff07()
  2026. LOCAL nKey, dGetTry := DATE(), GetList := {}
  2027. SETCOLOR( IIF( ! lMono, 'n/bg', 'w/n' ))
  2028. twExplode( .T. )
  2029. twOpen( ,,,,,,, '' )
  2030. twOpen( 5, 10, 19, 69, 'w/b, gr+/r,,, n/w', 3, 4 )
  2031. twExplode( .F. )
  2032. twTitle( 'TSD twCalendar()', '', 'T', 'C' )
  2033. twTitle( 'Shift-F1 to Call Calendar', '', 'B', 'C' )
  2034. twDateInit( 2, 3, MAINCLC, 3, 1, .T. )
  2035. SET KEY K_SH_F1 TO twCallDate()
  2036.  
  2037. DO WHILE .T.
  2038.     @ twRow( 4 ), twCol( 10 ) SAY "Get a Value" GET dGetTry PICTURE "@D"
  2039.     twReadModal( GetList ); GetList := {}
  2040.  
  2041.     IF LASTKEY() == K_ESC
  2042.         EXIT
  2043.     ENDIF
  2044.  
  2045. ENDDO
  2046.  
  2047. twDateInit( 2, 3, MAINCYN, 7, 10, .F. )
  2048. SET KEY K_SH_F1 TO
  2049.  
  2050. DO WHILE .T.
  2051.     @ twRow( 6 ), twCol( 10 ) SAY "Get a Value" GET dGetTry PICTURE "@D" WHEN twCalendar( @dGetTry )
  2052.     twReadModal( GetList ); GetList := {}
  2053.  
  2054.     IF LASTKEY() == K_ESC
  2055.         EXIT
  2056.     ENDIF
  2057.  
  2058. ENDDO
  2059.  
  2060. twPop(); twPop()
  2061. RETURN
  2062.  
  2063. //-------------------------------------------------------------------
  2064. //
  2065. //  PROCEDURE BStuff08()
  2066. //
  2067. //     Purpose: Hardware Stuff
  2068. //
  2069. //----- Documented: 09-29-91 at 12:34:07pm --------------------------
  2070. PROCEDURE BStuff08()
  2071. LOCAL nKey := 0, aKeyTry := {}, nX := 0, nRow := 3
  2072. LOCAL cDrStat := "0", nDrive := 0, GetList := {}, RetVal
  2073. SETCOLOR( IIF( ! lMono, 'n/bg', 'w+/n' ))
  2074. twOpen()
  2075. twOpen( 2, 5, 21, 74, MAINBLU, 3, 4 )
  2076. twTitle( "Testing twIsDrive()" )
  2077. twTitle( "Get out a Diskette or Two!!!!!!!!!!!!!",, "B", "C" )
  2078. BEEPER
  2079. DO WHILE .T.
  2080.     twSay( 2, 5, "Enter Drive to Check ( 0 for Drive A:, 1 for Drive B: )!" )
  2081.     @ twRow( 4 ), twCol( 12 ) GET nDrive PICTURE "#"
  2082.     twReadModal( GetList ); GetList := {}
  2083.     IF LASTKEY() == K_ESC
  2084.         EXIT
  2085.     ENDIF
  2086.  
  2087.     twIsDrive( nDrive, 3, 4 )
  2088.  
  2089. ENDDO
  2090. twPop()
  2091.  
  2092. twOpen( 2, 5, 21, 74, MAINBLU, 3, 4 )
  2093. twTitle( "Testing tw_GetKSt() - Try the Keys!!!", "n/w", "T", "C" )
  2094. AADD( aKeyTry, RSHIFT        )
  2095. AADD( aKeyTry, LSHIFT        )
  2096. AADD( aKeyTry, CTRL          )
  2097. AADD( aKeyTry, ALT           )
  2098. AADD( aKeyTry, SCROLLSTAT    )
  2099. AADD( aKeyTry, NUMLOCKSTAT   )
  2100. AADD( aKeyTry, CAPLOCKSTAT   )
  2101. AADD( aKeyTry, INSERTSTAT    )
  2102. AADD( aKeyTry, CTRLNUMLKSTAT )
  2103. AADD( aKeyTry, SCROLLOCK     )
  2104. AADD( aKeyTry, NUMLOCK       )
  2105. AADD( aKeyTry, CAPLOCK       )
  2106. AADD( aKeyTry, INSERT        )
  2107. twSay( nRow++, 15, "        Right Shift:")
  2108. twSay( nRow++, 15, "         Left Shift:")
  2109. twSay( nRow++, 15, "            Control:")
  2110. twSay( nRow++, 15, "          Alternate:")
  2111. twSay( nRow++, 15, " Scroll Lock Status:")
  2112. twSay( nRow++, 15, "Number Lock Status :")
  2113. twSay( nRow++, 15, "   Caps Lock Status:")
  2114. twSay( nRow++, 15, "      Insert Status:")
  2115. twSay( nRow++, 15, "Ctrl NumLock Status:")
  2116. twSay( nRow++, 15, "    Scroll Lock Key:")
  2117. twSay( nRow++, 15, "    Number Lock Key:")
  2118. twSay( nRow++, 15, "      Caps Lock Key:")
  2119. twSay( nRow++, 15, "         Insert Key:")
  2120.  
  2121. DO WHILE ( nkey := Inkey()) != 27
  2122.     twTitle( "Counter" + STRINT( ++nX ), "", "B", "C" )
  2123.     nRow := 3
  2124.     twSay( nRow++, 35, STR( tw_GetKSt( RSHIFT        )), IIF( tw_GetKSt( RSHIFT        )= 0,"w/b","gr+/b"))
  2125.     twSay( nRow++, 35, STR( tw_GetKSt( LSHIFT        )), IIF( tw_GetKSt( LSHIFT        )= 0,"w/b","gr+/b"))
  2126.     twSay( nRow++, 35, STR( tw_GetKSt( CTRL          )), IIF( tw_GetKSt( CTRL          )= 0,"w/b","gr+/b"))
  2127.     twSay( nRow++, 35, STR( tw_GetKSt( ALT           )), IIF( tw_GetKSt( ALT           )= 0,"w/b","gr+/b"))
  2128.     twSay( nRow++, 35, STR( tw_GetKSt( SCROLLSTAT    )), IIF( tw_GetKSt( SCROLLSTAT    )= 0,"w/b","gr+/b"))
  2129.     twSay( nRow++, 35, STR( tw_GetKSt( NUMLOCKSTAT   )), IIF( tw_GetKSt( NUMLOCKSTAT   )= 0,"w/b","gr+/b"))
  2130.     twSay( nRow++, 35, STR( tw_GetKSt( CAPLOCKSTAT   )), IIF( tw_GetKSt( CAPLOCKSTAT   )= 0,"w/b","gr+/b"))
  2131.     twSay( nRow++, 35, STR( tw_GetKSt( INSERTSTAT    )), IIF( tw_GetKSt( INSERTSTAT    )= 0,"w/b","gr+/b"))
  2132.     twSay( nRow++, 35, STR( tw_GetKSt( CTRLNUMLKSTAT )), IIF( tw_GetKSt( CTRLNUMLKSTAT )= 0,"w/b","gr+/b"))
  2133.     twSay( nRow++, 35, STR( tw_GetKSt( SCROLLOCK     )), IIF( tw_GetKSt( SCROLLOCK     )= 0,"w/b","gr+/b"))
  2134.     twSay( nRow++, 35, STR( tw_GetKSt( NUMLOCK       )), IIF( tw_GetKSt( NUMLOCK       )= 0,"w/b","gr+/b"))
  2135.     twSay( nRow++, 35, STR( tw_GetKSt( CAPLOCK       )), IIF( tw_GetKSt( CAPLOCK       )= 0,"w/b","gr+/b"))
  2136.     twSay( nRow++, 35, STR( tw_GetKSt( INSERT        )), IIF( tw_GetKSt( INSERT        )= 0,"w/b","gr+/b"))
  2137. ENDDO
  2138. twInkeyWait( 3 )
  2139. twPop();twPop()
  2140.  
  2141. RETURN
  2142.  
  2143. //-------------------------------------------------------------------
  2144. //
  2145. //  PROCEDURE PopaFew()
  2146. //
  2147. //     Purpose: Display and Pop 20 Windows to Open
  2148. //              the Demoonstration
  2149. //
  2150. //----- Documented: 06-15-91 at 09:58:41pm --------------------------
  2151. PROCEDURE PopaFew()
  2152. twOpen( 05, 10, 10, 67, RED_BLH, 1, 06 )      ; twInkeyWait( .2 )
  2153. twOpen( 08, 45, 22, 55, BLU_CYH, 3, 05, "▒" ); twInkeyWait( .2 )
  2154. twOpen( 15, 23, 20, 79, GRN_WHH, 7, 04, "." ); twInkeyWait( .2 )
  2155. twOpen( 02, 02, 12, 44, BLA_YLH, 9, 03, "░" ); twInkeyWait( .2 )
  2156. twOpen( 18, 05, 22, 75, CYH_RED, 5, 02, "▓" ); twInkeyWait( .2 )
  2157. twOpen( 11, 60, 17, 77, BLU_YLH, 3, 01, "█" ); twInkeyWait( .2 )
  2158. twOpen( 09, 34, 18, 57, WHH_BLU, 7, 07, "" ); twInkeyWait( .2 )
  2159. twOpen( 03, 50, 09, 70, BLA_GNH, 1, 08, "" ); twInkeyWait( .2 )
  2160. twOpen( 12, 03, 17, 57, WHH_VIH, 9, 09, "" ); twInkeyWait( .2 )
  2161. twOpen( 18, 14, 21, 38, YEL_VIO, 7, 10, "" ); twInkeyWait( .2 )
  2162. twOpen( 05, 48, 17, 67, GRH_BAH, 1, 11, "" ); twInkeyWait( .2 )
  2163. twOpen( 01, 70, 18, 76, WHI_BRN, 9, 12, "" ); twInkeyWait( .2 )
  2164. twOpen( 02, 34, 17, 42, BLH_RED, 3, 13, "" ); twInkeyWait( .2 )
  2165. twOpen( 03, 06, 09, 18, REH_BLH, 1, 14, "" ); twInkeyWait( .2 )
  2166. twOpen( 10, 20, 13, 50, WHH_RDH, 1, 06, "0" )
  2167. //*********************************************************************
  2168. // There is sometimes a problem with ';' in Clipper 5.01
  2169. //*********************************************************************
  2170. twInkeyWait( .2 )
  2171. twOpen( 08, 12, 20, 39, BLH_YLH, 3, 05, "" ); twInkeyWait( .2 )
  2172. twOpen( 01, 45, 07, 69, BLH_WHH, 9, 08, "*" ); twInkeyWait( .2 )
  2173. twOpen( 14, 71, 22, 77, BLA_BLH, 7, 07, "" ); twInkeyWait( .2 )
  2174. twOpen( 04, 30, 11, 47, VIO_GNH, 3, 10, "" ); twInkeyWait( .2 )
  2175.  
  2176. twOpen( 18, 09, 20, 73, BLU_CYH, 1, 04, "" )
  2177. twCenter( 1, " Trilateral Systems Development Ltd. ", RDH_CYH, )
  2178. twInkeyWait( .2 )
  2179. twOpen( 07, 51, 15, 68, WHH_BLH, 1, 08 ); twInkeyWait( 1 )
  2180. twCenter( 3, "Let's" ); twCenter( 4, "Pop 'Em" ); twInkeyWait( .5 )
  2181.  
  2182. SETBLINK( .T. ); twInkeyWait( 2 )
  2183. IF ! lMono
  2184.     SETBLINK( .F. )
  2185. ENDIF
  2186.  
  2187. FOR nX = 1 TO 21
  2188.     twPop(); twInkeyWait( .1 )
  2189. NEXT
  2190. RETURN
  2191.  
  2192. //-------------------------------------------------------------------
  2193. //
  2194. //  PROCEDURE SignOff()
  2195. //
  2196. //     Purpose: End of Demonstration Display
  2197. //
  2198. //----- Documented: 06-15-91 at 09:58:52pm --------------------------
  2199. PROCEDURE SignOff()
  2200. LOCAL f, nWin1
  2201.  
  2202. IF ! lMono
  2203.     SETBLINK( .F. )
  2204. ENDIF
  2205. //******************
  2206. // Thank You Screen
  2207. //******************
  2208. twOpen( 5, 5, 19, 74, CYH_RDH, 3, 10, "▒" )
  2209. twReplicate( 1, 1, "▀", 68, YEL_WHH )
  2210. twReplicate( 13, 1, "▄", 68, YEL_WHH )
  2211. twOpen( 9, 27, 14, 50, BLU_CYN, 3 )
  2212. twSay( 1, 4, "Trilateral" )
  2213. twSay( 1, 4, "T", RDH_CYN )
  2214. twSay( 2, 4, "Systems" )
  2215. twSay( 2, 4, "S", YEL_CYN )
  2216. twSay( 3, 4, "Development Ltd." )
  2217. twSay( 3, 4, "D", WHH_CYN )
  2218. twSay( 4, 4, "( 519 )-758-0867" )
  2219. twInkeyWait( 2 )
  2220. twSay( 00, 0, "             says       ", BLU_CYN )
  2221. twSay( 00, 9, "T", RDH_CYN )
  2222. twSay( 00, 10, "S", YEL_CYN )
  2223. twSay( 00, 11, "D", WHH_CYN )
  2224. twInkeyWait( 1 )
  2225. twSay( 01, 0, " Thank You for Watching ", YEL_RDH )
  2226. twInkeyWait( 1 )
  2227. twSay( 02, 0, "  Registered  Versions  ", WHH_BLH )
  2228. twInkeyWait( 1 )
  2229. twSay( 03, 0, "     Are  Available     ", BLA_YLH )
  2230. twInkeyWait( 1 )
  2231. twSay( 04, 0, "      At Low  Cost      ", RDH_GNH )
  2232. twInkeyWait( 2 )
  2233. twSay( 05, 0, "   ..Please Contact..   ", WHH_VIH )
  2234. twInkeyWait( 5 )
  2235. twPop()
  2236. twPop()
  2237. twClear( .F., "░" )
  2238. //************************
  2239. //      Copyright Screen
  2240. //************************
  2241. twExplode( .T. )
  2242. nWin1 := twOpen( 0, 0, maxrow(), maxcol(), BLU_CYN, 5 )
  2243. twExplode( .F. )
  2244.  
  2245. twOpen( 16, 65, 22, 78, WHH_CYN )
  2246. twSay( 00, 0, " ▄▄▄▄▄▄▄▄▄▄▄▄▄ ", RDH_CYN )
  2247. twSay( 01, 0, " ▀     █     ▀ ", RDH_CYN )
  2248. twSay( 02, 0, "       █       ", RDH_CYN )
  2249. twSay( 03, 0, "       █       ", RDH_CYN )
  2250. twSay( 04, 0, "       █       ", RDH_CYN )
  2251. twSay( 05, 0, "       █       ", RDH_CYN )
  2252. twSay( 06, 0, "       █       ", RDH_CYN )
  2253. twSay( 07, 0, "      ▄█▄      ", RDH_CYN )
  2254. //inkey( 0 )
  2255. twSlide( "U", 13 )
  2256. twSlide( "L", 61 )
  2257. //inkey( 0 )
  2258. twOpen( 15, 64, 22, 77, WHH_CYN )
  2259. twSay( 00, 0, "▄▄▄▄▄▄▄▄▄▄▄▄▄▄", YEL_CYN )
  2260. twSay( 01, 0, "█            █", YEL_CYN )
  2261. twSay( 02, 0, "█            █", YEL_CYN )
  2262. twSay( 03, 0, "█             ", YEL_CYN )
  2263. twSay( 04, 0, "▀▀▀▀▀▀▀▀▀▀▀▀▀█", YEL_CYN )
  2264. twSay( 05, 0, "             █", YEL_CYN )
  2265. twSay( 06, 0, "█            █", YEL_CYN )
  2266. twSay( 07, 0, "█            █", YEL_CYN )
  2267. twSay( 08, 0, "█▄▄▄▄▄▄▄▄▄▄▄▄█", YEL_CYN )
  2268. //inkey( 0 )
  2269. twSlide( "U", 7 )
  2270. twSlide( "L", 60 )
  2271. SETCOLOR( YEL_CYN )
  2272. //inkey( 0 )
  2273. @5 + 3, 4 say "▄▄▄▄▄▄▄█▄▄▄▄▄▄"
  2274. @6 + 3, 4 say "█     ▄█▄    █"
  2275. SETCOLOR( RDH_CYN )
  2276. @5 + 3, 11 say "█"
  2277. @6 + 3, 10 say "▄█▄"
  2278. //inkey( 0 )
  2279. twOpen( 16, 65, 22, 78, WHH_CYN )
  2280. twSay( 00, 0, "  ▄▄▄▄▄▄▄▄▄▄  ", WHH_CYN )
  2281. twSay( 01, 0, "  ██       █  ", WHH_CYN )
  2282. twSay( 02, 0, "  ██       █  ", WHH_CYN )
  2283. twSay( 03, 0, "  ██       █  ", WHH_CYN )
  2284. twSay( 04, 0, "  ██       █  ", WHH_CYN )
  2285. twSay( 05, 0, "  ██       █  ", WHH_CYN )
  2286. twSay( 06, 0, "  ██▄▄▄▄▄▄▄█  ", WHH_CYN )
  2287. //inkey( 0 )
  2288. twSlide( "U", 02 )
  2289. twSlide( "L", 61 )
  2290. SETCOLOR( YEL_CYN )
  2291. //inkey( 0 )
  2292. @11 + 3, 4 say "█ ▄▄▄▄▄▄▄▄▄▄ █"
  2293. @12 + 3, 4 say "█▄██▄▄▄▄▄▄▄█▄█"
  2294. //inkey( 0 )
  2295. SETCOLOR( WHH_CYN )
  2296. @11 + 3, 6 say "▄▄▄▄▄▄▄▄▄▄"
  2297. //inkey( 0 )
  2298. @12 + 3, 6 say "██"
  2299. //inkey( 0 )
  2300. @12 + 3, 15 say "█"
  2301. //inkey( 0 )
  2302. _twHandle( nWin1 )
  2303. twSay( 15 + 3, 20, "█   █ ▀█▀ █▄▄▄" )
  2304. twSay( 16 + 3, 20, "█ █ █  █  █  █" )
  2305. twSay( 17 + 3, 20, "█▄█▄█ ▄█▄ █  █         CLIPPER 5.01 Windowing Library" )
  2306. twInkeyWait( .5 )
  2307. twCenter( 22, "VISA - MasterCard - American Express - Discover", GNH_CYN )
  2308. twCenter( 23, "Please specify diskette format!", YEL_CYN )
  2309.  
  2310. twHLine( 01, 21, 56, 1, BLH_CYN )
  2311.  
  2312. twSay( 02, 21, "TSDWIN.LIB v1.50 is a ShareWare Product. You are free to", RED_CYN )
  2313. twSay( 03, 21, "use it in order  to judge its  usefulness to you in your", RED_CYN )
  2314. twSay( 04, 21, "   situation. If you like and continue to  use TSDWIN, ", RED_CYN )
  2315. twSay( 05, 21, "          please register one of these options:", RED_CYN )
  2316. twSay( 07, 29, "1. Register Your Version 1.50 $ 65.00 US" )
  2317. twSay( 09, 29, "2. Latest Version/Part Source $ 85.00 US" )
  2318. twSay( 11, 29, "3. Latest Version/Full Source $185.00 US" )
  2319. twSay( 13, 29, "All include your Disk Format with Manual" )
  2320. twSay( 14, 29, "and NG on disk. Support BBS membership." )
  2321. twSay( 15, 29, "See ORDERFRM.DOC for Details." )
  2322. twSay( 17, 36, "TSDWIN's customers are the most important", BLA_CYN )
  2323. twSay( 18, 36, "      factor in its evolving design!", BLA_CYN )
  2324. twCalcInit( 2, 3, "gr+/gr, g+/n,,, r+/n", 3, 10 )
  2325. twDateInit( 2, 3, "gr+/gr, g+/n,,, r+/n", 3, 1, .F. )
  2326. SET KEY K_F2 TO twCallCalc()
  2327. SET KEY K_F3 TO twCallDate()
  2328. twInkeyWait( 3 )
  2329. twWarn( { "By the way, the CALCULATOR is active on F2 right now!!!", ;
  2330.          "             and the Calendar is on F3" }, "twCalculator()", 2,,, 3, 2 )
  2331. _twHandle( nWin1 )
  2332. twTitle( "Any Key",, "B", "C" )
  2333. twInkeyWait( 30 )
  2334. twSay( 17, 36, "                                         ", BLA_CYN )
  2335. twSay( 18, 36, "  Here's where you can place your order!", RED_CYN )
  2336. twInkeyWait( 3 )
  2337. twScroll( 15, .F., 1, 21, 17, 77 )
  2338. twInkeyWait( 1 )
  2339. twSay( 02, 21, "          CANADA              U.S.A. -  Central/West   " , RED_CYN )
  2340. twSay( 03, 21, "       TSD Limited             FOX Business Systems    " , WHH_CYN )
  2341. twSay( 04, 21, "     18 Bond St. South             217 McCall Rd.      " , BLA_CYN )
  2342. twSay( 05, 21, "    Dundas, ON,  Canada        Manhattan, KS,  66502   " , BLA_CYN )
  2343. twSay( 06, 21, "          L9H 3H1               Voice: 913-776-1452    " , BLA_CYN )
  2344. twSay( 07, 21, "    Voice: 416-628-5086           BBS: 913-776-0111    " , BLA_CYN )
  2345. twSay( 08, 21, "      BBS: 519-650-0389                                " , BLA_CYN )
  2346.  
  2347. twSay( 10, 21, "       U.S.A -  East                   EUROPE          " , RED_CYN )
  2348. twSay( 11, 21, "     Ahlstedt Software       Meisal SoftWare Production" , WHH_CYN )
  2349. twSay( 12, 21, "  2212 Wade Hampton Blvd.            Torgvegen 17      " , BLA_CYN )
  2350. twSay( 13, 21, "Greenville, SC, 29615-2249      Kleppe, Norway, N4060  " , BLA_CYN )
  2351. twSay( 14, 21, "    Voice: 803-292-2249           Voice: +474-425625   " , BLA_CYN )
  2352. twSay( 15, 21, "                                         +474-627555   " , BLA_CYN )
  2353.  
  2354. twTitle( "Press a Key to End Demo",, "B", "C" )
  2355. twInkeyWait( 0 )
  2356. twPop()
  2357. RETURN
  2358.  
  2359. //-------------------------------------------------------------------
  2360. //
  2361. //  PROCEDURE Phones()
  2362. //
  2363. //     Purpose: Scroll the possible phone numbers for dialing.
  2364. //
  2365. //----- Documented: 09-14-91 at 10:35:20pm --------------------------
  2366. PROCEDURE Phones()
  2367. LOCAL aPhones := { "1-416-628-5086    TSD Ltd. Brantford, ON, Canada            ", ;
  2368.                    "1-913-776-1452    Fox Business Systems, Manhattan, KS, USA  ", ;
  2369.                    "1-803-292-2249    Ahlstedt Software, Greenville, SC, USA    ", ;
  2370.                    "011+474-627555    Meisal Software Production, Kleppe, Norway" }
  2371. LOCAL nNumber, GetList := {}
  2372.  
  2373. twOpen( FULLSCREEN, MAINBLU, 5, 10 )
  2374. twTitle( "You Can Register Now!", "n/w", "T", "C" )
  2375. twCenter( 2, "If you have a Hayes compatibles modem connected on COM1, " )
  2376. twCenter( 3, "Select a number to Dial and we will take your order!" )
  2377. twInkeyWait( 3 )
  2378.  
  2379. nNumber := twPopChoice( aPhones, "By the way, This is twPopChoice()",,,, MAINBRN, 3, 4 )
  2380.  
  2381. IF nNumber != 0
  2382.     nNumber := LEFT( aPhones[ nNumber ], 16 )
  2383.     twCenter( 5, "You may want to edit the number if it's not long distance!" )
  2384.     @ twRow( 7 ), twCol( 25 ) SAY "Dial: " GET nNumber
  2385.     SETCURSOR( 1 )
  2386.     twReadModal( GetList ); GetList := {}
  2387.     SETCURSOR( 0 )
  2388.  
  2389.     IF LASTKEY() != K_ESC
  2390.         tw_MdInit( 300 )
  2391.         tw_MdStr( "M1L1" )
  2392.         twCenter( 9, "Dialing: " + nNumber )
  2393.         twSay2( 11, 14, "Press «SPACEBAR» after «CONNECT» or engaging your phone." )
  2394.         Inkey( 1 )
  2395.         tw_MdDial( nNumber )
  2396.         tw_MdStr( "Z0" )
  2397.     ENDIF
  2398.  
  2399. ENDIF
  2400.  
  2401. twPop()
  2402. RETURN
  2403.  
  2404. //-------------------------------------------------------------------
  2405. //
  2406. //  PROCEDURE Scroller()
  2407. //
  2408. //     Purpose: Scroll Display in Activate Demonstration
  2409. //
  2410. //----- Documented: 06-15-91 at 09:59:04pm --------------------------
  2411. PROCEDURE Scroller()
  2412. nY := 1
  2413. DO WHILE nY <= 2
  2414.     twSay( 1, 1, " Use Your Imagination ", YEL_RDH ); twInkeyWait( .1 )
  2415.     twScroll( -1, .F. ); twInkeyWait( .1 )
  2416.     twSay( 1, 1, " **  Have a  Ball  ** ", BLA_GNH ); twInkeyWait( .1 )
  2417.     twScroll( -1, .F. ); twInkeyWait( .1 )
  2418.     twSay( 1, 1, " CLIPPERING is a joy, ", WHH_BLH ); twInkeyWait( .1 )
  2419.     twScroll( -1, .F. ); twInkeyWait( .1 )
  2420.     twSay( 1, 1, " with  TSD's  Windows ", RDH_YLH ); twInkeyWait( .1 )
  2421.     twScroll( -1, .F. ); twInkeyWait( .1 )
  2422.     nY++
  2423. ENDDO
  2424. twSay( 1, 1, " **Happy Clippering** ", WHH_VIH )
  2425. RETURN
  2426.  
  2427. //-------------------------------------------------------------------
  2428. //
  2429. //  PROCEDURE FourWin()
  2430. //
  2431. //     Purpose: Opens Four Windows
  2432. //              That we use a few times
  2433. //
  2434. //----- Documented: 06-15-91 at 09:59:14pm --------------------------
  2435. PROCEDURE FourWin()
  2436. //_twExplode( .T. )
  2437. nWin1 := twOpen( 9, 4, 19, 27, CYH_GRN, 7, 7 )
  2438. twTitle( "I'm Happy!!",, "T", "C" ); twInkeyWait( 2 )
  2439.  
  2440. nWin2 := twOpen( 3, 34, 14, 72, GNH_VIO, 9, 9 )
  2441. twTitle( "I AM the Greatest",, "T", "C" ); twCenter( 2, "Here's One" )
  2442. twInkeyWait( 2 )
  2443.  
  2444. nWin3 := twOpen( 7, 12, 17, 49, ;
  2445.            IIF( ! lMono, "r/*gr, w+/b,,, n/bg", "w+/n, n/w,,, w/n" ), 1, 2 )
  2446. twTitle( "I Shall Prevail",, "T", "C" ); twCenter( 2, "Here's Another" )
  2447. twInkeyWait( 2 )
  2448.  
  2449. nWin4 := twOpen( 12, 47, 20, 75, ;
  2450.            IIF( ! lMono, "g/*w, gr+/r,,, n/w", "w+/n, n/w,,, w/n" ), 3, 4 )
  2451. twTitle( "Hard Rock",, "T", "C" ); twCenter( 2, "And Another" )
  2452. //_twExplode( .F. )
  2453. RETURN
  2454.  
  2455. //-------------------------------------------------------------------
  2456. //
  2457. //  PROCEDURE FournWin2()
  2458. //
  2459. //     Purpose: Opens Four Windows
  2460. //
  2461. //----- Documented: 06-15-91 at 09:59:23pm --------------------------
  2462. PROCEDURE FournWin2()
  2463. //_twExplode( .T. )
  2464. nWin1 := twOpen( 8, 10, 18, 70, RDH_CYH, 1, 2 ); twTitle( "Win 1",, "T", "C" )
  2465. twCenter( 3, "First Window" ); twInkeyWait( 1 )
  2466. nWin2 := twOpen( 5, 5, 20, 45, YEL_RED, 3, 2 ); twTitle( "Win 2",, "T", "C" )
  2467. twCenter( 5, "Second Window" ); twInkeyWait( 1 )
  2468. nWin3 := twOpen( 12, 24, 16, 68, WHH_BLU, 7, 2 ); twTitle( "Win 3",, "T", " C" )
  2469. twCenter( 2, "Third Window" );twInkeyWait( 1 )
  2470. nWin4 := twOpen( 2, 49, 22, 63, YEL_GRN, 9, 2 ); twTitle( "Win 4",, "T", "C" )
  2471. twCenter( 6, "Fourth" ); twCenter( 7, "Window" )
  2472. //_twExplode( .F. )
  2473. twInkeyWait( 2 )
  2474. RETURN
  2475.  
  2476. //-------------------------------------------------------------------
  2477. // SET KEY Procedures for User Sliding
  2478. //-------------------------------------------------------------------
  2479. PROCEDURE Wup
  2480. twSlide( "U", 1 ); RETURN
  2481.  
  2482. PROCEDURE Wdn
  2483. twSlide( "D", 1 ); RETURN
  2484.  
  2485. PROCEDURE Wlt
  2486. twSlide( "L", 1 ); RETURN
  2487.  
  2488. PROCEDURE Wrt
  2489. twSlide( "R", 1 ); RETURN
  2490.  
  2491. PROCEDURE Uplt
  2492. twSlide( "U", 1 ); twSlide( "L", 2 )
  2493. RETURN
  2494.  
  2495. PROCEDURE Uprt
  2496. twSlide( "U", 1 ); twSlide( "R", 2 )
  2497. RETURN
  2498.  
  2499. PROCEDURE Dnlt
  2500. twSlide( "D", 1 ); twSlide( " L", 2 )
  2501. RETURN
  2502.  
  2503. PROCEDURE Dnrt
  2504. twSlide( "D", 1 ); twSlide( "R", 2 )
  2505. RETURN
  2506.  
  2507. //-------------------------------------------------------------------
  2508. // Set Key Procedures for Redisplay from Stack
  2509. //-------------------------------------------------------------------
  2510. PROCEDURE DnWin1()
  2511. twDisplay( nWin1 ); RETURN
  2512.  
  2513. PROCEDURE DnWin2()
  2514. twDisplay( nWin2 ); RETURN
  2515.  
  2516. PROCEDURE DnWin3()
  2517. twDisplay( nWin3 ); RETURN
  2518.  
  2519. PROCEDURE DnWin4()
  2520. twDisplay( nWin4 ); RETURN
  2521.  
  2522. //-------------------------------------------------------------------
  2523. // Set Key Procedures for Window Activation
  2524. //-------------------------------------------------------------------
  2525. PROCEDURE AnWin1()
  2526. STATIC num := 0
  2527. twActivate( nWin1 )
  2528. twCenter( 4, "Try#: " + PADL( STRINT( ++num ), 2 ))
  2529. RETURN
  2530.  
  2531. PROCEDURE AnWin2()
  2532. STATIC num := 0
  2533. twActivate( nWin2 )
  2534. twCenter( 4, "Try#: " + PADL( STRINT( ++num ), 2 ))
  2535. RETURN
  2536.  
  2537. PROCEDURE AnWin3()
  2538. STATIC num := 0
  2539. twActivate( nWin3 )
  2540. twCenter( 4, "Try#: " + PADL( STRINT( ++num ), 2 ))
  2541. RETURN
  2542.  
  2543. PROCEDURE AnWin4()
  2544. STATIC num := 0
  2545. twActivate( nWin4 )
  2546. twCenter( 4, "Try#: " + PADL( STRINT( ++num ), 2 ))
  2547. RETURN
  2548.  
  2549. //-------------------------------------------------------------------
  2550. // Set Key Procedures for Window Sizing
  2551. //-------------------------------------------------------------------
  2552. PROCEDURE vplus
  2553. twSize( "V", 1 ); RETURN
  2554.  
  2555. PROCEDURE vminus
  2556. twSize( "V", -1 ); RETURN
  2557.  
  2558. PROCEDURE hplus
  2559. twSize( "H", 1 ); RETURN
  2560.  
  2561. PROCEDURE hminus
  2562. twSize( "H", -1 ); RETURN
  2563.  
  2564. //------------------------------------------------------------------------
  2565. //
  2566. //  FUNCTION CheckList( In_Alias, In_Field, ColHead )
  2567. //
  2568. //  Parameters:
  2569. //
  2570. //      Return:
  2571. //
  2572. //     Purpose: Executes in the WHEN condition in twDBPick()
  2573. //              Demonstration/
  2574. //
  2575. //----- Documented: 06-15-91 at 10:00:02pm -------------------------------
  2576. FUNCTION CheckList( In_Alias, In_Field, ColHead )
  2577.  
  2578. LOCAL bColor := IIF( ! lMono, "w+/g, gr+/br,,bg+/g n/w", ;
  2579.                                 "w+/n, n/w,,,w/n, n/w" )
  2580. LOCAL SelField, TcRecord1 := RECNO()
  2581. LOCAL TcSelect := SELECT()
  2582. LOCAL TcRecord2, t, RetVal
  2583.  
  2584. t := twDBPick( In_Alias, In_Field, ColHead, 2, 45, bColor, 1, 9 )
  2585. IF LASTKEY() <> 27
  2586.     SELECT &In_Alias; TcRecord2 := RECNO(); GOTO t
  2587.  
  2588.     SelField := In_Alias + "->" + In_Field
  2589.     KEYBOARD &SelField
  2590.     GO TcRecord2
  2591.     SELECT( TcSelect ); GO TcRecord1
  2592.     RetVal := .T.
  2593. ELSEIF LASTKEY() == 3  // page down
  2594.     RetVal := .T.
  2595. ELSE
  2596.     RetVal := .F.
  2597. ENDIF
  2598. RETURN RetVal
  2599.  
  2600. //------------------------------------------------------------------------
  2601. //
  2602. //  FUNCTION ChkInst()
  2603. //
  2604. //  Parameters:
  2605. //
  2606. //      Return:
  2607. //
  2608. //     Purpose:
  2609. //
  2610. //----- Documented: 06-15-91 at 10:00:20pm -------------------------------
  2611. FUNCTION ChkInst()
  2612. LOCAL tScr, iHandle, iTop, iLeft, iBottom, iRight, iHidden
  2613. LOCAL cClrTemp, iColor, iShadow, iFrame, iFcolor, iCurrent
  2614. LOCAL isTop, isLeft, isBottom, isRight, iwLength, iwWidth
  2615. LOCAL nKey := 0
  2616.  
  2617. iHandle   := STRINT( _twHandle())
  2618. iTop      := STRINT( _twTop())
  2619. iLeft     := STRINT( _twLeft())
  2620. iBottom   := STRINT( _twBottom())
  2621. iRight    := STRINT( _twRight())
  2622. isTop     := STRINT( _twsTop())
  2623. isLeft    := STRINT( _twsLeft())
  2624. isBottom  := STRINT( _twsBottom())
  2625. isRight   := STRINT( _twsRight())
  2626. iHidden   := LEFT( _twHidden(), 25 )
  2627. iColor    := _twColor()
  2628. iShadow   := STRINT( _twShadow())
  2629. iFrame    := STRINT( _twFrame())
  2630. iFcolor   := _twFcolor()
  2631. iCurrent  := LEFT( _twCurrent(), 25 )
  2632. iwLength  := STRINT( VAL( iBottom ) - VAL( iTop ) + 1 )
  2633. iwWidth   := STRINT( VAL( iRight ) - VAL( iLeft ) + 1 )
  2634.  
  2635. cClrTemp:=SETCOLOR( YEL_BLU )
  2636. tScr := SAVESCREEN( 0, 3, 19, 44 )
  2637. @ 00, 3 CLEAR TO 19, 44
  2638. @ 00, 3 TO 19, 44 DOUBLE
  2639. @ 00, 5 SAY "Instance Variables:"
  2640. @ 19, 5 SAY "Press a Key..."
  2641. @ 01, 5 SAY " _twHandle(): " + iHandle
  2642. @ 02, 5 SAY "    _twTop(): " + iTop
  2643. @ 03, 5 SAY "   _twLeft(): " + iLeft
  2644. @ 04, 5 SAY " _twBottom(): " + iBottom
  2645. @ 05, 5 SAY "  _twRight(): " + iRight
  2646. @ 06, 5 SAY "   _twsTop(): " + isTop
  2647. @ 07, 5 SAY "  _twsLeft(): " + isLeft
  2648. @ 08, 5 SAY "_twsBottom(): " + isBottom
  2649. @ 09, 5 SAY " _twsRight(): " + isRight
  2650. @ 10, 5 SAY " _twHidden(): " + iHidden
  2651. @ 11, 5 SAY "  _twColor(): " + iColor
  2652. @ 12, 5 SAY " _twShadow(): " + iShadow
  2653. @ 13, 5 SAY "  _twFrame(): " + iFrame
  2654. @ 14, 5 SAY " _twFcolor(): " + iFcolor
  2655. @ 15, 5 SAY "_twCurrent(): " + iCurrent
  2656. @ 16, 5 SAY "  WinLength: " + iwLength
  2657. @ 17, 5 SAY "   WinWidth: " + iwWidth
  2658.  
  2659. IF nMainChoice == nMenuLen
  2660.     INKEY( 1 )
  2661. ELSE
  2662.     nKey := INKEY( 0 )
  2663. ENDIF
  2664. RESTSCREEN( 0, 3, 19, 44, tScr )
  2665. SETCOLOR( cClrTemp )
  2666. RETURN( nKey )
  2667.  
  2668. //------------------------------------------------------------------------
  2669. //
  2670. //  FUNCTION CheckRtn( RetVal )
  2671. //
  2672. //  Parameters:
  2673. //
  2674. //      Return:
  2675. //
  2676. //     Purpose:
  2677. //
  2678. //----- Documented: 06-15-91 at 10:00:46pm -------------------------------
  2679. FUNCTION CheckRtn( RetVal )
  2680. LOCAL aTempArray := {}, aLen, Cntr
  2681. IF VALTYPE( RetVal ) == 'N'
  2682.     AADD( aTempArray, "Your Return Value Was:" )
  2683.     AADD( aTempArray, "Element Number: "+STRINT( RetVal ))
  2684. //  twInfo( InMsg, Header, Wait, wT, wL, sType, fType )
  2685.     twInfo( aTempArray,,,,, 3, 4 )
  2686. ELSEIF VALTYPE( RetVal ) == 'A'
  2687.     aLen := LEN( RetVal );Cntr:=0
  2688.     AADD( aTempArray, "You Picked:" )
  2689.     AEVAL( RetVal, {|| Cntr++, AADD( aTempArray, RetVal[ Cntr] ) } )
  2690.     twInfo( aTempArray,,,,, 3, 4 )
  2691. ENDIF
  2692. RETURN .t.
  2693.  
  2694. //-------------------------------------------------------------------
  2695. //
  2696. //  PROCEDURE Action1()
  2697. //
  2698. //     Purpose:
  2699. //
  2700. //----- Documented: 06-15-91 at 10:00:52pm --------------------------
  2701. PROCEDURE Action1()
  2702. twInfo( { "twInfo() can be passed either a string or an array", ;
  2703.          "to display. You may choose to require a keypress", ;
  2704.          "to exit, display the message for a specified time, ", ;
  2705.          "leave it on the screen and delete its memory from", ;
  2706.          "the stack, or you may close the area later.", "", ;
  2707.          "The default is to center the message on the screen, ", ;
  2708.          "But you can put it anywhere. You pick the place...", ;
  2709.          "We TRY to make it fit!!" }, ;
  2710.          "This Uses twInfo()",,,, 1, 1 )
  2711. RETURN
  2712.  
  2713. //-------------------------------------------------------------------
  2714. //
  2715. //  PROCEDURE Action2()
  2716. //
  2717. //     Purpose:
  2718. //
  2719. //----- Documented: 06-15-91 at 10:00:57pm --------------------------
  2720. PROCEDURE Action2()
  2721. twWarn( { "WARNING: Clipper Programming without using TSDWIN.LIB", ;
  2722.          "         Leads to a Loss of Valuable Relaxation Time." }, ;
  2723.          "This Uses twWarn()",,,, 1, 4 )
  2724. RETURN
  2725.  
  2726. //-------------------------------------------------------------------
  2727. //
  2728. //  PROCEDURE Action3()
  2729. //
  2730. //     Purpose:
  2731. //
  2732. //----- Documented: 06-15-91 at 10:01:01pm --------------------------
  2733. PROCEDURE Action3()
  2734. LOCAL Var2Read := SPACE( 20 )
  2735. Var2Read := twInquire( {"Try entering something.", "You can use this function", ;
  2736.                       "for quick and easy data", "entry!"}, ;
  2737.                       "twInquire() Test", Var2Read, 5, 10, 9, 2 )
  2738. twInfo( "You Entered: " + Var2Read )
  2739. RETURN
  2740.  
  2741. //-------------------------------------------------------------------
  2742. //
  2743. //  PROCEDURE Action4()
  2744. //
  2745. //     Purpose:
  2746. //
  2747. //----- Documented: 06-15-91 at 10:01:06pm --------------------------
  2748. PROCEDURE Action4()
  2749. twTextMsg( "twTextMsg() uses a long string of text as an input and "+;
  2750.          "splits it up into an array or lines which are then displayed "+;
  2751.          "in a box, whose size is defaulted or can be defined by the "+;
  2752.          "programmer. The idea comes from a routine in Rick Spence's "+;
  2753.          "new book.", ;
  2754.          "This Uses twTextMsg()",, 8, 10, 16, 69,, 1, 10 )
  2755. RETURN
  2756.